List of usage examples for android.app Fragment onResume
@CallSuper public void onResume()
From source file:com.tapchatapp.android.app.ui.TapchatFragmentStatePagerAdapter.java
@Override public void restoreState(Parcelable state, ClassLoader loader) { if (state != null) { Bundle bundle = (Bundle) state;/*from w w w . j a v a 2 s . c om*/ bundle.setClassLoader(loader); Parcelable[] fss = bundle.getParcelableArray("states"); mSavedState.clear(); mFragments.clear(); if (fss != null) { for (int i = 0; i < fss.length; i++) { mSavedState.add((Fragment.SavedState) fss[i]); } } Iterable<String> keys = bundle.keySet(); for (String key : keys) { if (key.startsWith("f")) { int index = Integer.parseInt(key.substring(1)); Fragment f = mFragmentManager.getFragment(bundle, key); if (f != null) { while (mFragments.size() <= index) { mFragments.add(null); } f.setMenuVisibility(false); mFragments.set(index, f); f.onResume(); } else { if (DEBUG) Log.w(TAG, "Bad fragment at key " + key); } } } } }