Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Keep preference screens open when rotating the device
Browse files Browse the repository at this point in the history
  • Loading branch information
rovo89 committed Jul 3, 2012
1 parent 28547dd commit 7f06aea
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Display the fragment as the main content.
getFragmentManager().beginTransaction().replace(android.R.id.content,
new PrefsFragment()).commit();
if (savedInstanceState == null)
getFragmentManager().beginTransaction().replace(android.R.id.content,
new PrefsFragment()).commit();
}



public static class PrefsFragment extends PreferenceFragment {
@Override
Expand Down

0 comments on commit 7f06aea

Please sign in to comment.