You can create a custom Preference by extending the Preference or DialogPreference . The following is an example in the Settings Guide on developer.android.com.
Alternatively, you may need to use ListPreference . The user gets one value from the list of values. The user interface is similar to the images in the tutorial that you linked to.
source share