【发布时间】:2011-11-02 09:32:04
【问题描述】:
在 checkBoxPreference 中有一个键 (android:key="show_airline_column_pref"),我知道当我想为复选框存储值时使用此键(如果它设置或未设置)。但我的困惑来自 prefScreen 键 (android:key="flight_columns_pref") ,为什么这个键存在?我应该在 prefScreen 的键中存储什么值?
有人能解释一下这个键的用法吗?当在此密钥中存储某些内容很有用时,我找不到示例。有人可以点亮我吗:) 谢谢
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:key="flight_columns_pref"
android:title="Flight Search Preferences"
android:summary="Set Columns for Search Results">
<CheckBoxPreference
android:key="show_airline_column_pref"
android:title="Airline"
android:summary="Show Airline column" />
</PreferenceScreen>
【问题讨论】:
标签: android android-xml android-preferences android-sharedpreferences