Whale,
Yes, there is a way to change the name programmatically. You should add android: key = "myTag" in your xml layout for PreferenceCategory. You can then access the PreferenceCategory from the code using findPreference ("myTag"). Code below:
XML:
<PreferenceCategory android:title="My Preferences"
android:key="myPreferencesTitle"
>
Java Code:
PreferenceCategory prefCat=(PreferenceCategory)findPreference("myPreferencesTitle");
prefCat.setTitle("My New Title");
Hope this helps.
source
share