Skip to content

Instantly share code, notes, and snippets.

@mr5z
Created December 7, 2015 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mr5z/beeaf38adfd2e7e87e67 to your computer and use it in GitHub Desktop.
Save mr5z/beeaf38adfd2e7e87e67 to your computer and use it in GitHub Desktop.
preferencefragment is shit
private void showSettings() {
getFragmentManager()
.beginTransaction()
.replace(android.R.id.content, new Settings())
.addToBackStack("settings")
.commit();
mSettingsShown = true;
}
private void hideSettings() {
getFragmentManager()
.beginTransaction()
.detach(new Settings())
.commit();
mSettingsShown = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment