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

    Android CheckBoxPreference title color

    I am using the code in this answer. But instead of setting the android:textColor for the Text View i use style="?background_text_color_theme" which has to set the text color depending on the theme of the application ( white text color for black…
    quad
    • 872
    • 3
    • 17
    • 37
    0
    votes
    1 answer

    PreferenceScreen has no child tags

    For some strange reason I am getting this strange error when I do ctrl+space on a prefferenceScreen.xml The errors are: PreferenceScreen has no child tags & PreferenceScreen has no known child tags I am using eclipse. How do you fix this? or…
    sdfwer
    • 1,042
    • 3
    • 10
    • 23
    0
    votes
    1 answer

    onItemClickListener on PreferenceActivity

    Im trying to retrieve the position of the pressed button, in a list of Preference. My class extends PreferenceActivity. This is my code: ListView listView = getListView(); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { …
    -1
    votes
    2 answers

    Starting a service via a SwitchPreference

    can anyone tell me how can I start/stop a location service (or any other service) when a SwitchPreference in a PreferenceScreen is toggled on/of? I'm using a settingsFragemnt (extending PreferenceFragemntCompat), which is hosted in my settings…
    Mohammad
    • 11
    • 2
    -1
    votes
    2 answers

    Can't add Preferences in the PreferenceScreen xml file

    I am new in the Android world. In the structural view of the PreferenceScreen xml file, as I select "PreferenceScreen" and click "Add..." button to add some preferences, an almost blank box pops up with nothing to add or select. I want to add a…
    I Roy
    • 11
    • 2
    -1
    votes
    1 answer

    RingtonePreference not saving in PreferenceActivity

    I am using PreferenceScreen to set some user preferences in my Android app. It works perfectly for several ListPreference and CheckboxPreference items, however I cannot get RingtonePreference to work properly. The appropriate ringtone dialog…
    1 2 3
    13
    14