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
    3
    votes
    1 answer

    CheckBoxPreference title long text doesn't start second line

    I have PreferenceScreen contain CheckBoxPreference which referd in manifest to PreferencesTheme , its title text is long so it appear in single line and words cut at end of line , im try to force screen to continue the text in second line by using…
    androidqq6
    • 1,526
    • 2
    • 22
    • 47
    3
    votes
    1 answer

    Android SwitchPreference not working correctly in 4.2.2

    Any idea why having multiple SwitchPreferences in a PreferenceScreen would create an issue whereby if you select any of the boxes it causes the other boxes to change? This issue occurs when testing on a Nexus 4 running 4.2.2 but not on a Galaxy S3…
    Jaz
    • 371
    • 1
    • 6
    • 20
    2
    votes
    3 answers

    Send broadcast intent from PreferenceScreen?

    Is it possible to directly send a broadcast intent from a PreferenceScreen? For example, I would like to do something like the following:
    Jon
    • 21
    • 3
    2
    votes
    0 answers

    Show tick on preference screen

    I have a PreferenceActivity with some preference items, and an "account" PreferenceCategory that shows the accounts configured in the application. Each account preference is a PreferenceScreen, with other options inside. I want to highlight the…
    jihonrado
    • 409
    • 2
    • 11
    2
    votes
    1 answer

    how to make the nested Android PreferenceScreen show in Full Screen(without titlebar in system)

    I have write an PreferenceActivity and it contains nested child PreferenceScreen. the problem is i want made them FullScreen, i've add theme.fullscreen in AndroidManifest and it works, but when i click on one of the sub-item to enter an nested…
    Xuelong
    • 98
    • 1
    • 8
    2
    votes
    1 answer

    What is the best way to create a multi-choice list in application settings on Android 10 and higher?

    I'm working on a simple news app based on a predefined list of RSS sources. I want to give the users the choice, to choose which sources they want to use. I'm thinking about a ListPreference in the settings menu, containing the available sources,…
    2
    votes
    2 answers

    How to set focus on editText Preference and show keyboard automatically?

    I am learning the Preferences and I have created this After clicking on EditText I am getting this What I am trying to do is this. The keybord and focus on edittext only shows when I click on it. I want it automatically when I click on…
    2
    votes
    2 answers

    State list for PreferenceScreen?

    I've added a widget layout to my preference screens showing an arrow icon, to indicate to users that there are more preferences behind a given PreferenceScreen. However, I notice when a PreferenceScreen is not enabled it is darkened. Is there a way…
    Nathan Fig
    • 14,970
    • 9
    • 43
    • 57
    2
    votes
    0 answers

    How to add an ActionBar to a PreferenceScreen?

    I have just migrated from ActionBarSherlock and I also had to increase the minSDK to 14. I am trying to make it look like the way it was. (I am not interested in the material design guidelines for now. My priority for now is to make it as similar as…
    2
    votes
    1 answer

    How to launch device's notification settings for my Android app from a PreferenceScreen

    I would like to launch the phone's notification settings for my Android app(Oreo version) from a PreferenceScreen. I am using below in preferences.xml file. However, it does not work. Does anyone have an idea?
    Jay
    • 75
    • 1
    • 7
    2
    votes
    1 answer

    PreferenceFragmentCompant showing null in onCreatePreferences on rootKey

    I am having a problem with PreferenceFragmentCompat while trying to develop nested settings for my android application. I have Fragment called Settings Fragment where I have following method: @Override public void onCreatePreferences(Bundle…
    modivno
    • 37
    • 7
    2
    votes
    3 answers

    Return from nested Android PreferenceScreen to previous PreferenceScreen

    I am programmatically creating a nested set of PreferenceScreens. When the user dives into one of these screens, and taps something in there, I want to go back to the previous PreferenceScreen, (i.e. the "parent"). I couldn't find any information on…
    Lennert
    • 925
    • 1
    • 7
    • 21
    2
    votes
    1 answer

    SwitchPreferenceCompat On/Off animation causes left alignment

    When I touch a switch, all other switches look normal like below: But the switch that is just touched aligns left like below: I'm using the following library for preferences screen: com.android.support:preference-v14:25.3.0 With these…
    Sait Banazili
    • 1,263
    • 2
    • 12
    • 27
    2
    votes
    1 answer

    TimePickerDialog widget in landscape mode (PreferenceScreen)

    The TimePickerDialog widget in PreferenceScreen in landscape mode is too small. screenshot I've tried out both approaches (PreferenceActivity and PreferenceFragments) according to these instructions: TimePicker in PreferenceScreen The…
    piotr
    • 41
    • 1
    • 5
    2
    votes
    1 answer

    Intent with PreferenceScreen in preferences.xml

    My Google-Fu is failing this Android newbie today. Does anybody know of a good example showing how to launch an intent from a PreferenceScreen? Something like:
    Wonko the Sane
    • 10,623
    • 8
    • 67
    • 92