我有两个SwitchPreferences:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference android:key="app_main_switch"
android:title="@string/app_name"
android:defaultValue="true"/>
<Preference android:title="@string/events_lowercase"
android:dependency="app_main_switch">
<intent android:targetPackage="hu.ppke.itk.marma.android.bead"
android:targetClass="hu.ppke.itk.marma.android.bead.EventList"/>
</Preference>
<Preference android:title="@string/filters_lowercase"
android:dependency="app_main_switch">
<intent android:targetPackage="hu.ppke.itk.marma.android.bead"
android:targetClass="hu.ppke.itk.marma.android.bead.FilterList"/>
</Preference>
<SwitchPreference android:dependency="app_main_switch"
android:key="learn_switch"
android:defaultValue="false"
android:title="@string/learning"/>
</PreferenceScreen>
现在每次点击其中一个,另一个也会切换。怎么会发生这种情况,我该如何解决这个问题?