Search code examples
androidpreferenceactivity

Preference Fragment doesn't open in new Preference screen


I've been trying to show preference fragment data in a separate preference screen. Tried alot of things but no success. Currently, the data is being displayed on the right half of the screen, while header preferences are visible on the left side:

Current state

I want to show the data on full screen:

Desired result

Thanks in advance!


Solution

  • This guide explains the way to implement what you want.

    Basically, you should only have a single PreferenceFragment per PreferenceActivity screen (this toggles a single-pane view); create & call another PreferenceActivity when you want to show another group of preferences.