Question

I am working with a PreferenceActivity that will be fully compatible with tablets.

For this, I will work as advised by Google in this page.

@Override
public void onBuildHeaders(List<Header> target) {
    loadHeadersFromResource(R.xml.preference_headers, target);
}

My problem is that I would like to be able to select the default header when the activity is launched.

For instance, I have several headers;

  • General Settings
  • UI Settings
  • Network settings

And depending on which activity I come from, I would like to display the correct settings.

Is there a way to achieve that?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top