private FragmentTransaction doTabChanged(String paramString, FragmentTransaction paramFragmentTransaction) { Object localObject = null; for (int i = 0; i < this.mTabs.size(); ++i) { TabInfo localTabInfo = (TabInfo)this.mTabs.get(i); if (!localTabInfo.tag.equals(paramString)) continue; localObject = localTabInfo; } if (localObject == null) throw new IllegalStateException("No tab known for tag " + paramString); if (this.mLastTab != localObject) { if (paramFragmentTransaction == null) paramFragmentTransaction = this.mFragmentManager.beginTransaction(); if ((this.mLastTab != null) && (this.mLastTab.fragment != null)) paramFragmentTransaction.detach(this.mLastTab.fragment); if (localObject != null) { if (localObject.fragment != null) break label190; TabInfo.access$102(localObject, Fragment.instantiate(this.mContext, localObject.clss.getName(), localObject.args)); paramFragmentTransaction.add(this.mContainerId, localObject.fragment, localObject.tag); } } while (true) { this.mLastTab = localObject; return paramFragmentTransaction; label190: paramFragmentTransaction.attach(localObject.fragment); } }
public void addTab(TabHost.TabSpec paramTabSpec, Class<?> paramClass, Bundle paramBundle) { paramTabSpec.setContent(new DummyTabFactory(this.mContext)); String str = paramTabSpec.getTag(); TabInfo localTabInfo = new TabInfo(str, paramClass, paramBundle); if (this.mAttached) { TabInfo.access$102(localTabInfo, this.mFragmentManager.findFragmentByTag(str)); if ((localTabInfo.fragment != null) && (!localTabInfo.fragment.isDetached())) { FragmentTransaction localFragmentTransaction = this.mFragmentManager.beginTransaction(); localFragmentTransaction.detach(localTabInfo.fragment); localFragmentTransaction.commit(); } } this.mTabs.add(localTabInfo); addTab(paramTabSpec); }
if (i < this.mTabs.size()) { label13: TabInfo localTabInfo = (TabInfo)this.mTabs.get(i); TabInfo.access$102(localTabInfo, this.mFragmentManager.findFragmentByTag(localTabInfo.tag)); if ((localTabInfo.fragment != null) && (!localTabInfo.fragment.isDetached())) { if (!localTabInfo.tag.equals(str)) break label98; this.mLastTab = localTabInfo; } while (true) { ++i; break label13: if (localFragmentTransaction1 == null) label98: localFragmentTransaction1 = this.mFragmentManager.beginTransaction(); localFragmentTransaction1.detach(localTabInfo.fragment); } }