FileDocCategorySizeDatePackage
NoSaveStateFrameLayout.javaAPI DocAndroid 5.1 API2164Thu Mar 12 22:22:56 GMT 2015android.support.v4.app

NoSaveStateFrameLayout

public class NoSaveStateFrameLayout extends android.widget.FrameLayout
Pre-Honeycomb versions of the platform don't have {@link View#setSaveFromParentEnabled(boolean)}, so instead we insert this between the view and its parent.

Fields Summary
Constructors Summary
public NoSaveStateFrameLayout(android.content.Context context)

        super(context);
    
Methods Summary
protected voiddispatchRestoreInstanceState(android.util.SparseArray container)
Override to prevent thawing of any child views.

        dispatchThawSelfOnly(container);
    
protected voiddispatchSaveInstanceState(android.util.SparseArray container)
Override to prevent freezing of any child views.

        dispatchFreezeSelfOnly(container);
    
static android.view.ViewGroupwrap(android.view.View child)

        NoSaveStateFrameLayout wrapper = new NoSaveStateFrameLayout(child.getContext());
        ViewGroup.LayoutParams childParams = child.getLayoutParams();
        if (childParams != null) {
            wrapper.setLayoutParams(childParams);
        }
        NoSaveStateFrameLayout.LayoutParams lp = new NoSaveStateFrameLayout.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
        child.setLayoutParams(lp);
        wrapper.addView(child);
        return wrapper;