Skip to content

Instantly share code, notes, and snippets.

@ar-android
Created September 2, 2015 04:26
Show Gist options
  • Save ar-android/4ccd106244669e5b862e to your computer and use it in GitHub Desktop.
Save ar-android/4ccd106244669e5b862e to your computer and use it in GitHub Desktop.
This is for cuztomizing tab indicator
//Customizing Tab indicator
PagerTabStrip pagerTabStrip = (PagerTabStrip) findViewById(R.id.pager_header);
pagerTabStrip.setDrawFullUnderline(true);
pagerTabStrip.setTabIndicatorColor(getResources().getColor(R.color.icons));
for (int i = 0; i < pagerTabStrip.getChildCount(); ++i) {
View nextChild = pagerTabStrip.getChildAt(i);
if (nextChild instanceof TextView) {
TextView tv = (TextView) nextChild;
tv.setTextColor(getResources().getColor(R.color.icons));
tv.setTextSize(20);
tv.setAllCaps(true);
tv.setPadding(0,0,0,10);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment