我有一个设置菜单,其中有一个CheckBox Preference
. 我希望当它CheckBox
被选中时,显示一个 android: Title 并且当它显示另一个时。
这是我到目前为止所做的
设置.xml
<CheckBoxPreference
android:key="no_notification"
android:summary="Disable Notification message"
android:title="@string/titolo"
android:summaryOn="@string/acceso"
android:summaryOff="@string/spento"
/>
字符串.xml
<string name="titolo">Disable / Enable Notification</string>
<string name="acceso">Enable notification</string>
<string name="spento">Disable Notification</string>
在实践中,我希望在未选中时显示 Android:title Disable 以及选中时如何启用。我能怎么做?