pref_general.xml 1.4 KB

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