PreferenceActivity in Android is a base class for an activity to show a hierarchy of preferences to the user
Questions tagged [preferenceactivity]
680 questions
6
votes
3 answers
Using PreferenceScreen with applicationIdSuffix
I'm having some problems making PreferenceScreen and applicationIdSuffix work together.
Supposing my app package/applicationId is com.myapp in Gradle and in AndroidManifest.xml, and applicationIdSuffix is defined as:
buildTypes {
debug {
…

Salem
- 12,808
- 4
- 34
- 54
6
votes
0 answers
Android - EditTextPreference does not close keyboard once dialog dismissed
I'm building a settings screen using PreferenceFragment within PreferenceActivity. Everything works fine other than an annoying issue where the soft keyboard stays visible after an EditTextPreference dialog has been closed, either by tapping…

Jonathan Wareham
- 3,357
- 7
- 46
- 82
6
votes
1 answer
Change font size of summary in Preference
Does anybody know how to change the font size of both title and summary?
If I define my own style and set
- 30sp
Both the title and summary are set to this size. I want to make the summary 24sp, but I can't seem…
user445338
6
votes
1 answer
Xamarin android OnSharedPreferenceChangeListener
I've got this activity and have a problem with OnSharedPreferenceChanged not being called.
My use case is that i want to show preference value in preference description. Code below translated is translated from java where works perfectly…

FluffyCroc
- 162
- 1
- 9
6
votes
1 answer
How to setOnTouchListener() on a ListPreference?
Handling onTouchEvent on a view is straightforward as every view has the setOnTouchListener() method to do just that.
Alas, although ListPreference is a view, it isn't defined in a layout XML, and thus can't be accessed via findViewById(). So... I…

scatmoi
- 1,958
- 4
- 18
- 32
6
votes
4 answers
Android - Headers categories in PreferenceActivity with PreferenceFragment
I would like to display a preference screen like the one in the Android settings app : using headers, PreferenceActivity, PreferenceFragment and headers categories.
I wan't this result on a tablet :
And this one on a smartphone :
It works if I…

Tim Autin
- 6,043
- 5
- 46
- 76
6
votes
2 answers
Android PreferenceActivity and dialog fragments
The app I am developing has an activity that extends SherlockFragmentActivity. I would like to use the preferences api in order to easily add preferences to the activity. Since I would like to support api level 8 and above, I have to extend the…

Marco Masci
- 818
- 10
- 22
6
votes
2 answers
Set Value of a CheckBoxPreference in an Activity
Hello I need to know how to set a value programmatically.
I am using that code
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
.
.
…

Mano
- 517
- 1
- 8
- 21
6
votes
3 answers
setHomeButtonEnabled on PreferenceActivity and nested preference
I have preference screen extended PreferenceActivity. For targeting OS 4.0.3, I wanted to add < icon on action bar so I did this in onCreate().
ActionBar actionBar =…

Tomcat
- 1,405
- 3
- 22
- 37
5
votes
3 answers
How can I select the default header in my PreferenceActivity on tablets?
I am working with a PreferenceActivity that will be fully compatible with tablets.
For this, I will work as advised by Google in this page.
@Override
public void onBuildHeaders(List target) {
…

Waza_Be
- 39,407
- 49
- 186
- 260
5
votes
1 answer
Is possible to change the summary of EditTextPreference dynamically in Android?
I set up a preferenceScreen to edit the settings in my application. I would like to insert an EditTextPreference that contains a Title like "set your name" and a summary containing the name entered.
Is that possible? thank you in advance!

fran
- 515
- 2
- 11
- 22
5
votes
1 answer
How to add Toolbar in PreferenceActivity
I have created an app settings with Preferences.
But I noticed, that there no toolbar in my PreferenceActivity.
How I can add toolbar to my PreferenceActivity?
My code:
my pref_xml:

Олег Медведев
- 143
- 3
- 14
5
votes
2 answers
Android. PreferenceActivity. ListPreference. How can I change the backgrounds color of ListPreference?
Implements the "night theme". I don't know how to change the background color of ListPreference.
PreferenceActivity "day" theme
PreferenceActivity night theme
As you can see, only to pick up the color of the title of "night" colors.
I use the…

Roman Novoselov
- 151
- 6
5
votes
0 answers
How to use the new API of the preferences, presented on the new support library 23
Background
Google hasn't supported backward-compatibility Preferences to look like Holo/Material in the past, which is why I've made my own library for this (here, in case anyone wants it), but now I think that Google has provided some sort of…

android developer
- 114,585
- 152
- 739
- 1,270