I have a preference xml file that at some point of it it looks like this:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="Hello there">
<!-- Profile ** -->
<PreferenceScreen
android:key="profile"
android:summary="Let app access my profile info such as name, picture and other account information."
android:title="User Profile">
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_profile"
android:summary="Let app access my profile such as name, picture and other account information."
android:title="My Profile" />
As you can see I have 2 preferenceScreen. I want to get the preferenceScreen of the CheckBoxPreference(so the preference screen with key: profile). When i use:
PreferenceScreen prefScreen = getPreferenceScreen();
I get the one with the title: Hello there. How can i get the direct parent(first parent) screen of this checkBoxPreference? I want to get it so i can disable or enable its view.
Any ideas??Thanks!!