Example usage for android.preference PreferenceScreen restoreHierarchyState

List of usage examples for android.preference PreferenceScreen restoreHierarchyState

Introduction

In this page you can find the example usage for android.preference PreferenceScreen restoreHierarchyState.

Prototype

public void restoreHierarchyState(Bundle container) 

Source Link

Document

Restore this Preference hierarchy's previously saved state from the given container.

Usage

From source file:apps.veery.com.util.PreferenceFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (mHavePrefs) {
        bindPreferences();/*  www. j  a v  a2  s.  co  m*/
    }

    mInitDone = true;

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

From source file:com.limelight.testvideosdk.PreferenceFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    if (mHavePrefs) {
        bindPreferences();/*from  ww w.j a va  2s  . c  o m*/
    }
    mInitDone = true;
    if (savedInstanceState != null) {
        Bundle container = savedInstanceState.getBundle(PREFERENCES_TAG);
        if (container != null) {
            final PreferenceScreen preferenceScreen = getPreferenceScreen();
            if (preferenceScreen != null) {
                preferenceScreen.restoreHierarchyState(container);
            }
        }
    }
}