I want some other preference to depend on a preference that causes the intention to do some processing.
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <Preference android:key="urlpref" android:summary="summary here" android:title="title here" > <intent android:action="android.intent.action.VIEW" android:data="http://www.android.com" android:targetClass="com.example.app.popupactivity" android:targetPackage="com.example.app" /> </Preference> <CheckBoxPreference android:defaultValue="false" android:key="enablepref" android:summary="Summary" android:title="title" android:dependency="urlpref"/>
Basically, the first preference triggers an activity that takes input from the user and stores it in a sharedpreference.
now my checkbox will not be enabled or disabled based on this. I also tried adding urlpref
android:disableDependentsState="true"
So what is the right way to do this?
source share