Example usage for android.app FragmentContainer FragmentContainer

List of usage examples for android.app FragmentContainer FragmentContainer

Introduction

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

Prototype

FragmentContainer

Source Link

Usage

From source file:android.app.FragmentState.java

void instantiateChildFragmentManager() {
    mChildFragmentManager = new FragmentManagerImpl();
    mChildFragmentManager.attachActivity(mActivity, new FragmentContainer() {
        @Override/*  w  w  w .jav a 2 s .c  om*/
        public View findViewById(int id) {
            if (mView == null) {
                throw new IllegalStateException("Fragment does not have a view");
            }
            return mView.findViewById(id);
        }
    }, this);
}

From source file:android.app.FragmentState.java

void instantiateChildFragmentManager() {
    mChildFragmentManager = new FragmentManagerImpl();
    mChildFragmentManager.attachActivity(mActivity, new FragmentContainer() {
        @Override//w  w w .  j a  v  a2 s. co  m
        public View findViewById(int id) {
            if (mView == null) {
                throw new IllegalStateException("Fragment does not have a view");
            }
            return mView.findViewById(id);
        }

        @Override
        public boolean hasView() {
            return (mView != null);
        }
    }, this);
}