I have studied preference activity but I don't understand it. Can anybody tell me what is the use of preference activity? How does it differ from activity?
Thanks
I have studied preference activity but I don't understand it. Can anybody tell me what is the use of preference activity? How does it differ from activity?
Thanks
PreferencesActivity is a way to easily create preference screens such as those in Android itself, just look under Settings
. These can be used inside applications to easily save preferences to SharedPreferences and then easily access these from within your app.
See this page for more information on PreferenceActivity.
An example of a PreferenceActivity showing some preferences:
It gives a very easy way to create a standard looking settings screen for any application.
minimal coding is required
it takes care of UI.The values are stored in SharedPreferences automatically by the PreferenceActivity and so its scope becomes app wide.
such settings screen, you can use it for your app where user want to change setting.
It is usually used to create a settings screen for applications .The values are stored in SharedPreferences automatically as soon as user selects a preference setting. It frees the programmer from explicitly saving preference values.
PreferenceActivity is a class that allows you to implement an activity that realizes a hierarchical organization of choices. Most often it provides a good bases for building the settings activity in you application.