Android tutorial (2018) - 80 - Create Simple App Settings Page Using Preference API

Опубликовано: 31 Май 2026
на канале: Andriod Developer Tips
66
0

In some situation your app needs a settings page. For example you can allow user to change Theme of your app and you can allow the user to enable or disable notifications from the app itself. All these cases you have to create a separate settings activity for your app.

Android Framework contains an API called Preferences that allow you to create app settings page without using any view widgets. Preferences API uses objects of its sub classes for creating each settings item.

Example
CheckBoxPreference
ListPreference

You can user Preferences Activity or PreferenceFragment for creating App settings. Recommended way is to use PreferenceFragment.

In this video we learn about how to create a simple settings layout using Preferences Objects. #Andriod_Developer_Tips
Youtube Link: https://bit.ly/2ys3ceY
Facebook Link: http://bit.ly/2C7JSr0
Twitter Link: http://bit.ly/2Cbz9Ml