【发布时间】:2011-11-02 09:59:17
【问题描述】:
我见过这样的:
<PreferenceCategory xmlns:android="http://schemas.android.com/apk/res/android"
android:key="vegi_category" android:title="Vegetables"
android:summary="Preferences related to vegetable"> <!-- Why is this here? -->
<CheckBoxPreference android:key="tomato_selection_pref"
android:title="Tomato " android:summary="It's actually a fruit" />
<CheckBoxPreference android:key="potato_selection_pref"
android:title="Potato" android:summary="My favorite vegetable" />
</PreferenceCategory>
但我不明白为什么 pref 类别有一个汇总字段:
(android:summary="Preferences related to vegetable") ?
当我使用 pref screen 时,摘要会显示在视图中,但 pref 类别不是这种情况。 pref 类别中摘要的存在是否只是一种可以以某种方式看到的约定?
pref category 元素中summary的实际用法是什么?
【问题讨论】:
标签: android android-preferences android-sharedpreferences