Search code examples
settingsscreenshot

How much of the settings screen is standard


The image shows the settings page on my HTC One X.

How much of this is standard Android GUI components?

How do I go about making an application that looks a little like this?

The main features I'm looking for are:

1) Sections with smaller text
2) Click a line to go to another detailed activity 3) Images 4) on/off controls on the line

http://i37.tinypic.com/1xzei0.png


Solution

  • These things are generally built using PreferenceFragment, or the older PreferenceActivity:
    http://developer.android.com/reference/android/preference/PreferenceFragment.html

    A lot of those things are already implemented for you, like separate PreferenceScreen screens you can go to by clicking, the smaller summary text under each item, etc.. Switches are this class:
    http://developer.android.com/reference/android/preference/SwitchPreference.html

    And there are many others, including ones that pop up a list of options or a dialog with an edit text with a certain type of input, or just Preference itself which you can set your own click listener on.