Android隐藏Preference与PreferenceGroup
属性布局文件test.xml
[html]
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:key="base" android:title="test">
<CheckBoxPreference android:key="sub01" />
<CheckBoxPreference android:key="sub02" />
</PreferenceCategory>
</PreferenceScreen>
隐藏Preference与PreferenceGroup
[html]
PreferenceGroup base = ((PreferenceGroup) findPreference("base"));
Preference sub01 = findPreference("sub01");
隐藏Preference:
[java] www.zzzyk.com
base.removePreference(sub01);
如果需要隐藏PreferenceGroup整个组的话包括sub01和sub02
[java]
base.removeAll();
补充:移动开发 , Android ,