Code example for SharedPreferences

Methods: unregisterOnSharedPreferenceChangeListener

0
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        mPreferences.unregisterOnSharedPreferenceChangeListener(this);
    } 
 
    @Override 
    public void onBuildHeaders(List<Header> target) {
        loadHeadersFromResource(R.xml.preferences_headers, target);
        updateHeaders(target);
    } 
 
    private void updateHeaders(List<Header> headers) {
        int i = 0;
        while (i < headers.size()) {
            Header header = headers.get(i);
 
            // Version preference 
            if (header.id == R.id.preferences_application_version) {