1 <PreferenceScreen xmlns:
android=
"http://schemas.android.com/apk/res/android"
2 android:
layout_width=
"match_parent"
3 android:
layout_height=
"match_parent"
7 android:
key=
"example_checkbox"
8 android:
title=
"@string/pref_title_social_recommendations"
9 android:
summary=
"@string/pref_description_social_recommendations"
10 android:
defaultValue=
"true" />
12 <!-- NOTE: EditTextPreference accepts EditText attributes. -->
13 <!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
15 android:
key=
"@string/pref_location_key"
16 android:
title=
"@string/pref_location_label"
17 android:
defaultValue=
"@string/pref_location_default"
18 android:
selectAllOnFocus=
"true"
19 android:
singleLine=
"true"
20 android:
maxLines=
"1" />
22 <!-- NOTE: Hide buttons to simplify the UI. Users can touch outside the dialog to
24 <!-- NOTE: ListPreference's summary should be set to its value by the activity code. -->
26 android:
key=
"example_list"
27 android:
title=
"@string/pref_title_add_friends_to_messages"
28 android:
defaultValue=
"-1"
29 android:
entries=
"@array/pref_example_list_titles"
30 android:
entryValues=
"@array/pref_example_list_values"
31 android:
negativeButtonText=
"@null"
32 android:
positiveButtonText=
"@null" />