Lines Matching refs:fragment
32 * kept in the fragment manager as long as the user can return to the page.
36 * The fragment of each page the user visits will be kept in memory, though its
38 * a significant amount of memory since fragment instances can hold on to an
54 * <p>The <code>R.layout.fragment_pager</code> resource of the top-level fragment is:
60 * individual fragment's layout is:
94 // Do we already have this fragment?
96 Fragment fragment = mFragmentManager.findFragmentByTag(name);
97 if (fragment != null) {
98 if (DEBUG) Log.v(TAG, "Attaching item #" + itemId + ": f=" + fragment);
99 mCurTransaction.attach(fragment);
101 fragment = getItem(position);
102 if (DEBUG) Log.v(TAG, "Adding item #" + itemId + ": f=" + fragment);
103 mCurTransaction.add(container.getId(), fragment,
106 if (fragment != mCurrentPrimaryItem) {
107 FragmentCompat.setMenuVisibility(fragment, false);
108 FragmentCompat.setUserVisibleHint(fragment, false);
111 return fragment;
126 Fragment fragment = (Fragment)object;
127 if (fragment != mCurrentPrimaryItem) {
132 if (fragment != null) {
133 FragmentCompat.setMenuVisibility(fragment, true);
134 FragmentCompat.setUserVisibleHint(fragment, true);
136 mCurrentPrimaryItem = fragment;