Example usage for android.app Fragment.SavedState Fragment.SavedState

List of usage examples for android.app Fragment.SavedState Fragment.SavedState

Introduction

In this page you can find the example usage for android.app Fragment.SavedState Fragment.SavedState.

Prototype

SavedState(Bundle state) 

Source Link

Usage

From source file:android.app.FragmentManager.java

@Override
public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) {
    if (fragment.mIndex < 0) {
        throwException(//  ww  w  .  j  a  v  a  2s  .c o m
                new IllegalStateException("Fragment " + fragment + " is not currently in the FragmentManager"));
    }
    if (fragment.mState > Fragment.INITIALIZING) {
        Bundle result = saveFragmentBasicState(fragment);
        return result != null ? new Fragment.SavedState(result) : null;
    }
    return null;
}