Java Code Examples for android.preference.PreferenceScreen#restoreHierarchyState()

The following examples show how to use android.preference.PreferenceScreen#restoreHierarchyState() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PreferenceCompatFragment.java    From Audinaut with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    getListView().setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
    if (mHavePrefs) {
        bindPreferences();
    }
    mInitDone = true;
    if (savedInstanceState != null) {
        Bundle localBundle = savedInstanceState.getBundle(PREFERENCES_TAG);
        if (localBundle != null) {
            PreferenceScreen screen = getPreferenceScreen();
            if (screen != null) {
                screen.restoreHierarchyState(localBundle);
            }
        }
    }
}
 
Example 2
Source File: PreferenceFragment.java    From droidddle with Apache License 2.0 6 votes vote down vote up
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (mHavePrefs) {
        bindPreferences();
    }

    mInitDone = true;

    if (savedInstanceState != null) {
        Bundle container = savedInstanceState.getBundle(PREFERENCES_TAG);
        if (container != null) {
            final PreferenceScreen preferenceScreen = getPreferenceScreen();
            if (preferenceScreen != null) {
                preferenceScreen.restoreHierarchyState(container);
            }
        }
    }
}
 
Example 3
Source File: PreferenceFragment.java    From datmusic-android with Apache License 2.0 6 votes vote down vote up
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (mHavePrefs) {
        bindPreferences();
    }

    mInitDone = true;

    if (savedInstanceState != null) {
        Bundle container = savedInstanceState.getBundle(PREFERENCES_TAG);
        if (container != null) {
            final PreferenceScreen preferenceScreen = getPreferenceScreen();
            if (preferenceScreen != null) {
                preferenceScreen.restoreHierarchyState(container);
            }
        }
    }
}
 
Example 4
Source File: PreferenceCompatFragment.java    From Popeens-DSub with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onActivityCreated(Bundle savedInstanceState) {
	super.onActivityCreated(savedInstanceState);
	getListView().setScrollBarStyle(View.SCROLLBAR_POSITION_DEFAULT);
	if (mHavePrefs) {
		bindPreferences();
	}
	mInitDone = true;
	if (savedInstanceState != null) {
		Bundle localBundle = savedInstanceState.getBundle(PREFERENCES_TAG);
		if (localBundle != null) {
			PreferenceScreen screen = getPreferenceScreen();
			if (screen != null) {
				screen.restoreHierarchyState(localBundle);
			}
		}
	}
}
 
Example 5
Source File: PreferenceFragmentBase.java    From AcDisplay with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (mHavePrefs) {
        bindPreferences();
    }

    mInitDone = true;

    if (savedInstanceState != null) {
        Bundle container = savedInstanceState.getBundle(PREFERENCES_TAG);
        if (container != null) {
            final PreferenceScreen preferenceScreen = getPreferenceScreen();
            if (preferenceScreen != null) {
                preferenceScreen.restoreHierarchyState(container);
            }
        }
    }
}
 
Example 6
Source File: PreferenceFragmentCompat.java    From MaxLock with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onActivityCreated(final Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    if (mHavePrefs) {
        bindPreferences();
    }
    mInitDone = true;
    if (savedInstanceState != null) {
        final Bundle container = savedInstanceState.getBundle(PreferenceManager.METADATA_KEY_PREFERENCES);
        if (container != null) {
            final PreferenceScreen preferenceScreen = getPreferenceScreen();
            if (preferenceScreen != null) {
                preferenceScreen.restoreHierarchyState(container);
            }
        }
    }
}
 
Example 7
Source File: PreferenceFragmentBase.java    From HeadsUp with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (mHavePrefs) {
        bindPreferences();
    }

    mInitDone = true;

    if (savedInstanceState != null) {
        Bundle container = savedInstanceState.getBundle(PREFERENCES_TAG);
        if (container != null) {
            final PreferenceScreen preferenceScreen = getPreferenceScreen();
            if (preferenceScreen != null) {
                preferenceScreen.restoreHierarchyState(container);
            }
        }
    }
}
 
Example 8
Source File: PreferenceFragment.java    From android-support-v4-preferencefragment with Apache License 2.0 6 votes vote down vote up
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (mHavePrefs) {
        bindPreferences();
    }

    mInitDone = true;

    if (savedInstanceState != null) {
        Bundle container = savedInstanceState.getBundle(PREFERENCES_TAG);
        if (container != null) {
            final PreferenceScreen preferenceScreen = getPreferenceScreen();
            if (preferenceScreen != null) {
                preferenceScreen.restoreHierarchyState(container);
            }
        }
    }
}