public FragmentTransaction show(Fragment fragment) { Op op = new Op(); op.cmd = 5; op.fragment = fragment; addOp(op); return this; }
public FragmentTransaction remove(Fragment fragment) { Op op = new Op(); op.cmd = 3; op.fragment = fragment; addOp(op); return this; }
private void doAddOp(int i, Fragment fragment, String s, int j) { fragment.mFragmentManager = mManager; if (s != null) { if (fragment.mTag != null && !s.equals(fragment.mTag)) throw new IllegalStateException( (new StringBuilder()) .append("Can't change tag of fragment ") .append(fragment) .append(": was ") .append(fragment.mTag) .append(" now ") .append(s) .toString()); fragment.mTag = s; } if (i != 0) { if (fragment.mFragmentId != 0 && fragment.mFragmentId != i) throw new IllegalStateException( (new StringBuilder()) .append("Can't change container ID of fragment ") .append(fragment) .append(": was ") .append(fragment.mFragmentId) .append(" now ") .append(i) .toString()); fragment.mFragmentId = i; fragment.mContainerId = i; } Op op = new Op(); op.cmd = j; op.fragment = fragment; addOp(op); }
public FragmentTransaction detach(Fragment fragment) { Op op = new Op(); op.cmd = 6; op.fragment = fragment; addOp(op); return this; }
public BackStackRecord instantiate(FragmentManagerImpl paramFragmentManagerImpl) { BackStackRecord localBackStackRecord = new BackStackRecord(paramFragmentManagerImpl); int i = 0; for (int j = 0; i < this.mOps.length; j++) { BackStackRecord.Op localOp = new BackStackRecord.Op(); int[] arrayOfInt1 = this.mOps; int k = i + 1; localOp.cmd = arrayOfInt1[i]; if (FragmentManagerImpl.DEBUG) Log.v("FragmentManager", "Instantiate " + localBackStackRecord + " op #" + j + " base fragment #" + this.mOps[k]); int[] arrayOfInt2 = this.mOps; int m = k + 1; int n = arrayOfInt2[k]; if (n >= 0); int i5; for (localOp.fragment = ((Fragment)paramFragmentManagerImpl.mActive.get(n)); ; localOp.fragment = null) { int[] arrayOfInt3 = this.mOps; int i1 = m + 1; localOp.enterAnim = arrayOfInt3[m]; int[] arrayOfInt4 = this.mOps; int i2 = i1 + 1; localOp.exitAnim = arrayOfInt4[i1]; int[] arrayOfInt5 = this.mOps; int i3 = i2 + 1; localOp.popEnterAnim = arrayOfInt5[i2]; int[] arrayOfInt6 = this.mOps; int i4 = i3 + 1; localOp.popExitAnim = arrayOfInt6[i3]; int[] arrayOfInt7 = this.mOps; i5 = i4 + 1; int i6 = arrayOfInt7[i4]; if (i6 <= 0) break; localOp.removed = new ArrayList(i6); int i7 = 0; while (i7 < i6) { if (FragmentManagerImpl.DEBUG) Log.v("FragmentManager", "Instantiate " + localBackStackRecord + " set remove fragment #" + this.mOps[i5]); ArrayList localArrayList = paramFragmentManagerImpl.mActive; int[] arrayOfInt8 = this.mOps; int i8 = i5 + 1; Fragment localFragment = (Fragment)localArrayList.get(arrayOfInt8[i5]); localOp.removed.add(localFragment); i7++; i5 = i8; } } i = i5; localBackStackRecord.addOp(localOp); } localBackStackRecord.mTransition = this.mTransition; localBackStackRecord.mTransitionStyle = this.mTransitionStyle; localBackStackRecord.mName = this.mName; localBackStackRecord.mIndex = this.mIndex; localBackStackRecord.mAddToBackStack = true; localBackStackRecord.mBreadCrumbTitleRes = this.mBreadCrumbTitleRes; localBackStackRecord.mBreadCrumbTitleText = this.mBreadCrumbTitleText; localBackStackRecord.mBreadCrumbShortTitleRes = this.mBreadCrumbShortTitleRes; localBackStackRecord.mBreadCrumbShortTitleText = this.mBreadCrumbShortTitleText; localBackStackRecord.bumpBackStackNesting(1); return localBackStackRecord; }