Created
September 2, 2015 04:26
-
-
Save ar-android/4ccd106244669e5b862e to your computer and use it in GitHub Desktop.
This is for cuztomizing tab indicator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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