List of usage examples for android.app Fragment setIndex
final void setIndex(int index, Fragment parent)
From source file:android.app.FragmentManager.java
void makeActive(Fragment f) { if (f.mIndex >= 0) { return;/*from ww w.j a v a 2s. c o m*/ } if (mAvailIndices == null || mAvailIndices.size() <= 0) { if (mActive == null) { mActive = new ArrayList<Fragment>(); } f.setIndex(mActive.size(), mParent); mActive.add(f); } else { f.setIndex(mAvailIndices.remove(mAvailIndices.size() - 1), mParent); mActive.set(f.mIndex, f); } if (DEBUG) Log.v(TAG, "Allocated fragment index " + f); }