ある時点で次のようになる設定xmlファイルがあります。
<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" />
ご覧のとおり、preferenceScreen が 2 つあります。私はCheckBoxPreferenceのpreferenceScreenを取得したい(キー:プロファイルを持つ設定画面)。私が使用するとき:
PreferenceScreen prefScreen = getPreferenceScreen();
タイトルが「こんにちは。このcheckBoxPreferenceの直接の親(最初の親)画面を取得するにはどうすればよいですか? ビューを無効または有効にできるように取得したい。
アイデアは??ありがとう!!