I have a preference xml ..
first im loading the preferences from an XML resource
addPreferencesFromResource(R.xml.preferences);
and setting some default values to it... After setting the default values , i need to hide (not to remove) one of my preference screen
My preference XML is
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<Preference
android:title="Account Settings"
android:key="customPref" />
<PreferenceScreen android:title="@string/account_1"
android:key="account">
<EditTextPreference
android:key="username"
android:title="@string/settings_username"
android:singleLine="true" />
<EditTextPreference
android:key="password"
android:title="@string/settings_password"
android:password="true"
android:singleLine="true" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/account_2"
android:key="account1">
<EditTextPreference
android:key="username1"
android:title="@string/settings_username"
android:singleLine="true" />
<EditTextPreference
android:key="password1"
android:title="@string/settings_password"
android:password="true"
android:singleLine="true" />
</PreferenceScreen>
</PreferenceScreen>
I need to hide the PreferenceScreen
having
title ="@string/account_2