Questions tagged [preferencescreen]

Represents a top-level Preference that is the root of a Preference hierarchy. A PreferenceActivity points to an instance of this class to show the preferences.

Represents a top-level Preference that is the root of a Preference hierarchy. A PreferenceActivity points to an instance of this class to show the preferences. To instantiate this class, use createPreferenceScreen(Context).

This class can appear in two places:

  • When a PreferenceActivity points to this, it is used as the root and is not shown (only the contained preferences are shown).
  • When it appears inside another preference hierarchy, it is shown and serves as the gateway to another screen of preferences (either by showing another screen of preferences as a Dialog or via a startActivity(android.content.Intent) from the getIntent()). The children of this PreferenceScreen are NOT shown in the screen that this PreferenceScreen is shown in. Instead, a separate screen will be shown when this preference is clicked.
  • 201 questions
    0
    votes
    1 answer

    How to change Preference text colour programmatically?

    I'm adding preferences programmatically to my instance of PreferenceScreen (which I add to my PreferenceActivity). Everything works as expected except for the text colour, which always is white despite trying: To set the theme through manifest Set…
    0
    votes
    2 answers

    clicking 'back' on PreferenceScreen closes current activity

    I have an activity that opens PreferenceScreen. When I click 'back' - I expect that the preference screen will be closed and I'll go back to the activity, but instead - the current activity is closed and I go back to the previous activity. How can I…
    TamarG
    • 3,522
    • 12
    • 44
    • 74
    0
    votes
    0 answers

    How to add a TextViewPreference

    Is there a way to add a TextView into a PreferenceScreen. I tryed somethink like
    momo
    • 3,313
    • 2
    • 19
    • 37
    0
    votes
    1 answer

    Changing max value in SeekBarPreference

    I can't change max value in standard SeekBarPreference.
    hackman
    • 3
    • 1
    0
    votes
    1 answer

    Attach physical menu button to my preferences screen

    My app has a classic PreferenceScreen which activity is triggered by a dedicated button on my UI. When I click the "Menu" button of the AVD, or the physical menu button on my device, a "Parameter" button shows at the bottom of the screen : pressing…
    Gonzoide
    • 45
    • 1
    • 5
    0
    votes
    1 answer

    How set value spinner when change textEdit of preferenceScreen?

    How to change the value of TextEdit of preference screen, I want that TextEdit of MainActivity to be changed. How can I do it?. @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { if…
    0
    votes
    1 answer

    Android: getPreferenceScreen vs getPreferenceManager

    I am little confused with the two methods available in PreferenceActivity, that are getPreferenceScreen() and getPreferenceManager(). I have gone through the stackoverflow thread : PreferenceFragment - Difference between getPreferenceManager() and…
    0
    votes
    0 answers

    admob in preference screen issue

    I am using preference screen in my app and was trying to implement AdMob. I followed this website to add AdMob on my preference screen. I tested my app on Galaxy Gio (320x480) Gingerbread OS 2.3.8, and Admob does not appear and rather give me a…
    Lzyct
    • 26
    • 1
    • 4
    0
    votes
    1 answer

    Android - sharedPreference not changed

    I have in PreferenceScreen one "button" and after click on it i need to change Boolean value of sharedPreference prefLogin on true, and that value can skip my skipping if in LoginActivity. But it is not working ! Intent yes but, alltimes redirect me…
    0
    votes
    1 answer

    Link to a nested PreferenceScreen via a notification

    I have a notification that, when clicked, takes the user to my app's preferences menu. That menu also has a nested PreferenceScreen. What I'm trying to accomplish is: when the notification is clicked, it brings the user to the nested…
    Geoff
    • 19
    • 3
    0
    votes
    1 answer

    How to set selection on the first option in PreferenceScreen

    I need to set selection on the first option in PreferenceScreen. My class is inherited from PreferenceFragment. I added my options in onResume() method by code: getPreferenceScreen().addPreference(aPreference); When I start my preferences app the…
    morbilli
    • 99
    • 8
    0
    votes
    0 answers

    Different layout with Layout of PreferenceScreen

    I use PreferenceScreen for my Settings. The acticitie works fine with the @android:style/Theme.Dialog theme. So a dialog appears center in my main activitie ! It works fine on ldpi, mdpi et hdpi but doesn't work on xhdpi. The switchpreferences…
    0
    votes
    2 answers

    Retaining items in a List View

    I'm new to android development having some problems. I created a list view that is based on the user input. User has to enter a category in a dialog box and then it's added into the list. Works like a charm. The question is how do I retain those…
    Dodi
    • 2,201
    • 4
    • 30
    • 39
    0
    votes
    0 answers

    PreferenceActivity and custom Seekbar layout

    I found this very useful site: http://android-journey.blogspot.de/2010/01/for-almost-any-application-we-need-to.html It shows a custom seekbar preference implementation. My Problem is, that I have several listpreference items in my…
    pawlinsky
    • 420
    • 1
    • 6
    • 18
    0
    votes
    1 answer

    Putting ads in PreferenceScreen

    Im trying to put admob ads in my preferencescreen. I have looked around and i've found a few threads about this. Though i can't get i working. For example this: Android Admob advert in PreferenceActivity You have an activity as is supposted to be…
    Sebastian
    • 2,698
    • 2
    • 17
    • 26
    1 2 3
    13
    14