Lines Matching refs:fragment

64      * Representation of an entry on the fragment back stack, as created
128 * <p>Note: A fragment transaction can only be created/committed prior
160 * Finds a fragment that was identified by the given id either when inflated
163 * activity; if no such fragment is found, then all fragments currently
165 * @return The fragment if found or null otherwise.
170 * Finds a fragment that was identified by the given tag either when inflated
173 * activity; if no such fragment is found, then all fragments currently
175 * @return The fragment if found or null otherwise.
206 * Pop the last fragment transition from the manager's fragment
264 * Add a new listener for changes to the fragment back stack.
275 * Put a reference to a fragment in a Bundle. This Bundle can be
278 * instance of the same fragment.
280 * @param bundle The bundle in which to put the fragment reference.
282 * @param fragment The Fragment whose reference is to be stored.
284 public abstract void putFragment(Bundle bundle, String key, Fragment fragment);
290 * @param bundle The bundle from which to retrieve the fragment reference.
298 * Get a list of all fragments that have been added to the fragment manager.
308 * it to the fragment manager, to have it create itself to match the
318 * store a fragment reference because that reference may not be valid when
325 * interesting state created by the fragment.
340 * Control whether the framework's internal fragment manager debugging
342 * the framework performs fragment operations.
555 public void putFragment(Bundle bundle, String key, Fragment fragment) {
556 if (fragment.mIndex < 0) {
557 throwException(new IllegalStateException("Fragment " + fragment
560 bundle.putInt(key, fragment.mIndex);
587 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) {
588 if (fragment.mIndex < 0) {
589 throwException( new IllegalStateException("Fragment " + fragment
592 if (fragment.mState > Fragment.INITIALIZING) {
593 Bundle result = saveFragmentBasicState(fragment);
756 Animation loadAnimation(Fragment fragment, int transit, boolean enter,
758 Animation animObj = fragment.onCreateAnimation(transit, enter,
759 fragment.mNextAnim);
764 if (fragment.mNextAnim != 0) {
765 Animation anim = AnimationUtils.loadAnimation(mActivity, fragment.mNextAnim);
834 // While removing a fragment, we can't change it to a higher state.
850 // The fragment is currently being animated... but! Now we
923 + ") for fragment " + f));
1004 final Fragment fragment = f;
1010 if (fragment.mAnimatingAway != null) {
1011 fragment.mAnimatingAway = null;
1012 moveToState(fragment, fragment.mStateAfterAnimating,
1035 // The fragment's containing activity is
1036 // being destroyed, but this fragment is
1040 // the fragment.
1047 // We are waiting for the fragment's view to finish
1049 // the fragment now should move to once the animation
1149 if (DEBUG) Log.v(TAG, "Allocated fragment index " + f);
1157 if (DEBUG) Log.v(TAG, "Freeing fragment index " + f);
1167 public void addFragment(Fragment fragment, boolean moveToStateNow) {
1171 if (DEBUG) Log.v(TAG, "add: " + fragment);
1172 makeActive(fragment);
1173 if (!fragment.mDetached) {
1174 if (mAdded.contains(fragment)) {
1175 throw new IllegalStateException("Fragment already added: " + fragment);
1177 mAdded.add(fragment);
1178 fragment.mAdded = true;
1179 fragment.mRemoving = false;
1180 if (fragment.mHasMenu && fragment.mMenuVisible) {
1184 moveToState(fragment);
1189 public void removeFragment(Fragment fragment, int transition, int transitionStyle) {
1190 if (DEBUG) Log.v(TAG, "remove: " + fragment + " nesting=" + fragment.mBackStackNesting);
1191 final boolean inactive = !fragment.isInBackStack();
1192 if (!fragment.mDetached || inactive) {
1194 mAdded.remove(fragment);
1196 if (fragment.mHasMenu && fragment.mMenuVisible) {
1199 fragment.mAdded = false;
1200 fragment.mRemoving = true;
1201 moveToState(fragment, inactive ? Fragment.INITIALIZING : Fragment.CREATED,
1206 public void hideFragment(Fragment fragment, int transition, int transitionStyle) {
1207 if (DEBUG) Log.v(TAG, "hide: " + fragment);
1208 if (!fragment.mHidden) {
1209 fragment.mHidden = true;
1210 if (fragment.mView != null) {
1211 Animation anim = loadAnimation(fragment, transition, false,
1214 fragment.mView.startAnimation(anim);
1216 fragment.mView.setVisibility(View.GONE);
1218 if (fragment.mAdded && fragment.mHasMenu && fragment.mMenuVisible) {
1221 fragment.onHiddenChanged(true);
1225 public void showFragment(Fragment fragment, int transition, int transitionStyle) {
1226 if (DEBUG) Log.v(TAG, "show: " + fragment);
1227 if (fragment.mHidden) {
1228 fragment.mHidden = false;
1229 if (fragment.mView != null) {
1230 Animation anim = loadAnimation(fragment, transition, true,
1233 fragment.mView.startAnimation(anim);
1235 fragment.mView.setVisibility(View.VISIBLE);
1237 if (fragment.mAdded && fragment.mHasMenu && fragment.mMenuVisible) {
1240 fragment.onHiddenChanged(false);
1244 public void detachFragment(Fragment fragment, int transition, int transitionStyle) {
1245 if (DEBUG) Log.v(TAG, "detach: " + fragment);
1246 if (!fragment.mDetached) {
1247 fragment.mDetached = true;
1248 if (fragment.mAdded) {
1249 // We are not already in back stack, so need to remove the fragment.
1251 if (DEBUG) Log.v(TAG, "remove from detach: " + fragment);
1252 mAdded.remove(fragment);
1254 if (fragment.mHasMenu && fragment.mMenuVisible) {
1257 fragment.mAdded = false;
1258 moveToState(fragment, Fragment.CREATED, transition, transitionStyle, false);
1263 public void attachFragment(Fragment fragment, int transition, int transitionStyle) {
1264 if (DEBUG) Log.v(TAG, "attach: " + fragment);
1265 if (fragment.mDetached) {
1266 fragment.mDetached = false;
1267 if (!fragment.mAdded) {
1271 if (mAdded.contains(fragment)) {
1272 throw new IllegalStateException("Fragment already added: " + fragment);
1274 if (DEBUG) Log.v(TAG, "add from attach: " + fragment);
1275 mAdded.add(fragment);
1276 fragment.mAdded = true;
1277 if (fragment.mHasMenu && fragment.mMenuVisible) {
1280 moveToState(fragment, mCurState, transition, transitionStyle, false);
1296 // Now for any known fragment.
1318 // Now for any known fragment.
1646 // stopping that change the fragment state. For those older
1648 // the state, so we will allow them to continue doing fragment
1684 + " has target not in fragment manager: " + f.mTarget));
1727 if (DEBUG) Log.v(TAG, "saveAllState: adding fragment #" + i
1793 // Now that the fragment is instantiated (or came from being
1815 Log.w(TAG, "Re-attaching retained fragment " + f
1830 "No instantiated fragment for index #" + fms.mAdded[i]));