Top "Android-preferences" questions

How do I display the current value of an Android Preference in the Preference summary?

This must come up very often. When the user is editing preferences in an Android app, I'd like them to …

android user-interface android-preferences
how to use getSharedPreferences in android

I have an application in which I have to implement a "Login" activity. I have these components: EditText username EditText …

android android-preferences sharedpreferences
Is it possible to add an array or object to SharedPreferences on Android

I have an ArrayList of objects that have a name and an icon pointer and I want to save it …

android android-preferences sharedpreferences
How to implement a confirmation (yes/no) DialogPreference?

How can I implement a Preference that displays a simple yes/no confirmation dialog? For an example, see Browser->…

android android-preferences confirmation dialog-preference
How to add a button to PreferenceScreen

Is there any way to add a button to the bottom of preferences screen and make them work correct when …

android android-preferences
SharedPreferences.onSharedPreferenceChangeListener not being called consistently

I'm registering a preference change listener like this (in the onCreate() of my main activity): SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); …

android android-preferences
Difference between getDefaultSharedPreferences and getSharedPreferences

What is the difference between getDefaultSharedPreferences and getSharedPreferences in Android? Can anyone please explain?

android android-preferences sharedpreferences
How to detect if changes were made in the preferences?

I have a class that extends PreferenceActivity and shows the preference screen of my app. Is it possible to check …

android sharedpreferences android-preferences preferenceactivity
How to add a button to a PreferenceScreen?

I'm quite new to Android Development and just came across Preferences. I found PreferenceScreen and wanted to create a login …

android android-button android-preferences
How to listen for preference changes within a PreferenceFragment?

As described here, I am subclassing PreferenceFragment and displaying it inside an Activity. That document explains how to listen for …

android android-fragments android-activity sharedpreferences android-preferences