Native Preference Controls

Android includes several preference controls to build your Preference Screens:

> CheckBoxPreference A standard preference checkbox control. Used to set preferences to true or false.

> EditTextPreference Allows users to enter a string value as a preference. Selecting the preference text will display a text entry dialog.

> ListPreference The preference equivalent of a spinner. Selecting this preference will display a dialog box containing a list of values from which to select. You can specify different arrays to contain the display text and selection values.

> RingtonePreference A specialized List Preference that presents the list of available ringtones for user selection. This is particularly useful when you're constructing a screen to configure notification settings.

Earehquake Preferences

My Preference Category

Check Box Preference

Check Box Preference Description

FIGURE 6-3

Each of these preference controls can be used to construct your Preference Screen hierarchy. Alternatively, you can create your own specialized preference controls by extending the Preference class (or any of these subclasses).

You can find further details on the Android documentation at: http://developer.android.com/ reference/android/preference/Preference.html

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide


Responses

  • gofreddo
    What are the native preference controls?
    2 years ago
  • Philipp
    What is native preference controls in android?
    11 months ago

Post a comment