BACKGROUND:
I have a preference.xml with 3 preference groups, call them GroupA, GroupB and GroupC, each of which have a number of items. I can start my options intent, and it shows my 3 groups, clicking on each group gives the sub items. This works just fine.
When I start the preferences intent from my main activity, I can pass some extra information as follows.
Intent intent = new Intent(this, Options.class);
intent.putExtra("pg","GroupB");
startActivity(intent);
and in the Options class, onCreate routine, read the extra information like this:
String sPrefGroup = intent.getStringExtra("scr");
QUESTION:
How do I instruct the Options class to display the selected PreferenceGroup, rather than starting at the root of the Preferences XML
The simple solution was to make a copy of the preferences.xml file, called preferences_groupb.xml which only contained the preference items I wanted to display
Then in the Options.class I used code similar to the following: