public virtual void setTabContainer([email protected] tabView) { if (mTabContainer != null) { removeView(mTabContainer); } mTabContainer = tabView; if (tabView != null) { addView(tabView); android.view.ViewGroup.LayoutParams lp = tabView.getLayoutParams(); lp.width = android.view.ViewGroup.LayoutParams.MATCH_PARENT; lp.height = android.view.ViewGroup.LayoutParams.WRAP_CONTENT; tabView.setAllowCollapse(false); } }
private void ensureTabsExist() { if (mTabScrollView != null) { return; } [email protected] tabScroller = new [email protected] (mContext); if (mHasEmbeddedTabs) { tabScroller.setVisibility(android.view.View.VISIBLE); mActionView.setEmbeddedTabView(tabScroller); } else { tabScroller.setVisibility(getNavigationMode() == NAVIGATION_MODE_TABS ? android.view.View .VISIBLE : android.view.View.GONE); mContainerView.setTabContainer(tabScroller); } mTabScrollView = tabScroller; }
private void ensureTabsExist() { if (mTabScrollView != null) { return; } [email protected] tabScroller = new [email protected] (mContext); if (mHasEmbeddedTabs) { tabScroller.setVisibility(android.view.View.VISIBLE); mActionView.setEmbeddedTabView(tabScroller); } else { tabScroller.setVisibility(getNavigationMode() == NAVIGATION_MODE_TABS ? android.view.View .VISIBLE : android.view.View.GONE); mContainerView.setTabContainer(tabScroller); } mTabScrollView = tabScroller; }