Home | History | Annotate | Download | only in tabcompat

Lines Matching refs:fragment

25 import android.support.v4.app.Fragment;
57 * instantiates the specified fragment class with no arguments when its tab is selected.
67 * @param activity The host Activity, used to instantiate the fragment
68 * @param cls The class representing the fragment to instantiate
70 public InstantiatingTabListener(TabCompatActivity activity, Class<? extends Fragment> cls) {
78 // Check if the fragment is already initialized
79 Fragment fragment = tab.getFragment();
80 if (fragment == null) {
82 fragment = Fragment.instantiate(mActivity, mClass.getName());
83 tab.setFragment(fragment);
84 ft.add(android.R.id.tabcontent, fragment, tab.getTag());
87 ft.attach(fragment);
93 Fragment fragment = tab.getFragment();
94 if (fragment != null) {
95 // Detach the fragment, because another one is being attached
96 ft.detach(fragment);
106 public static class PhotosFragment extends Fragment {
118 public static class VideosFragment extends Fragment {