Skip to content

Instantly share code, notes, and snippets.

@mightyfrog
Created April 8, 2015 13:31
Show Gist options
  • Select an option

  • Save mightyfrog/fe889d189e92f595cc34 to your computer and use it in GitHub Desktop.

Select an option

Save mightyfrog/fe889d189e92f595cc34 to your computer and use it in GitHub Desktop.

Revisions

  1. mightyfrog created this gist Apr 8, 2015.
    9 changes: 9 additions & 0 deletions OnSharedPreferenceChangeListener.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    ```java
    @Override
    public void onDetach() {
    PreferenceManager.getDefaultSharedPreferences(getActivity())
    .unregisterOnSharedPreferenceChangeListener(this);

    super.onDetach();
    }
    ```