| 1 |
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
| 2 |
|
| 3 |
<SwitchPreference |
| 4 |
android:key="example_switch" |
| 5 |
android:title="@string/pref_title_social_recommendations" |
| 6 |
android:summary="@string/pref_description_social_recommendations" |
| 7 |
android:defaultValue="true" /> |
| 8 |
|
| 9 |
<!-- NOTE: EditTextPreference accepts EditText attributes. --> |
| 10 |
<!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. --> |
| 11 |
<EditTextPreference |
| 12 |
android:key="example_text" |
| 13 |
android:title="@string/pref_title_display_name" |
| 14 |
android:defaultValue="@string/pref_default_display_name" |
| 15 |
android:selectAllOnFocus="true" |
| 16 |
android:inputType="textCapWords" |
| 17 |
android:capitalize="words" |
| 18 |
android:singleLine="true" |
| 19 |
android:maxLines="1" /> |
| 20 |
|
| 21 |
<!-- NOTE: Hide buttons to simplify the UI. Users can touch outside the dialog to |
| 22 |
dismiss it. --> |
| 23 |
<!-- NOTE: ListPreference's summary should be set to its value by the activity code. --> |
| 24 |
<ListPreference |
| 25 |
android:key="example_list" |
| 26 |
android:title="@string/pref_title_add_friends_to_messages" |
| 27 |
android:defaultValue="-1" |
| 28 |
android:entries="@array/pref_example_list_titles" |
| 29 |
android:entryValues="@array/pref_example_list_values" |
| 30 |
android:negativeButtonText="@null" |
| 31 |
android:positiveButtonText="@null" /> |
| 32 |
|
| 33 |
</PreferenceScreen> |