// region Lifecycle Methods @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_quick_return_twitter); ButterKnife.inject(this); mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager()); // Set up the ViewPager with the sections adapter. mViewPager.setAdapter(mSectionsPagerAdapter); mTabs.setAllCaps(false); mTabs.setShouldExpand(true); mTabs.setTextSize(QuickReturnUtils.dp2px(this, 16)); mTabs.setTabBackground(R.drawable.selector_bg_tab); mTabs.setIndicatorColorResource(R.color.steel_blue); mTabs.setIndicatorHeight(QuickReturnUtils.dp2px(this, 5)); mTabs.setOnPageChangeListener(mTabsOnPageChangeListener); mTabs.setViewPager(mViewPager); // Set first tab selected mTabsLinearLayout = ((LinearLayout) mTabs.getChildAt(0)); for (int i = 0; i < mTabsLinearLayout.getChildCount(); i++) { TextView tv = (TextView) mTabsLinearLayout.getChildAt(i); if (i == 0) { tv.setTextColor(getResources().getColor(R.color.steel_blue)); tv.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/Roboto-Medium.ttf")); } else { tv.setTextColor(getResources().getColor(R.color.steel_blue)); tv.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/Roboto-Light.ttf")); } } }
// region Lifecycle Methods @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_quick_return_facebook); ButterKnife.inject(this); mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager()); // Set up the ViewPager with the sections adapter. mViewPager.setAdapter(mSectionsPagerAdapter); mTabs.setAllCaps(false); mTabs.setShouldExpand(true); // mTabs.setTextSize(QuickReturnUtils.dp2px(this, 16)); // mTabs.setTabBackground(R.drawable.selector_bg_tab); mTabs.setIndicatorColorResource(R.color.steel_blue); mTabs.setIndicatorHeight(QuickReturnUtils.dp2px(this, 5)); mTabs.setDividerColor(getResources().getColor(android.R.color.transparent)); // mTabs.setBackgroundColor(getResources().getColor(R.color.indigo)); mTabs.setOnPageChangeListener(mTabsOnPageChangeListener); mTabs.setViewPager(mViewPager); // Set first tab selected mTabsLinearLayout = ((LinearLayout) mTabs.getChildAt(0)); ImageButton ib = (ImageButton) mTabsLinearLayout.getChildAt(0); ib.setImageResource(R.drawable.ic_action_event_highlighted); }