Skip to content

Instantly share code, notes, and snippets.

@matthewmorrone
Created September 30, 2020 15:56
Show Gist options
  • Select an option

  • Save matthewmorrone/a779d06ae64a7c767827c422d2efce5d to your computer and use it in GitHub Desktop.

Select an option

Save matthewmorrone/a779d06ae64a7c767827c422d2efce5d to your computer and use it in GitHub Desktop.
public boolean getPresentationShown() {
try {
return PreferenceManager.getDefaultSharedPreferences(this).getBoolean("presentation", false);
}
catch (Exception e) {
return false;
}
}
public void setPresentationShown() {
PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean("presentation", true).apply();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment