I\'m using ViewPagerIndicator, and haven\'t had any luck, so I\'ll ask here. Is there a way to change the font for the Tabs in a TabPageIndicator?
There is no need to use a third-party lib nor to change ViewPagerIndicator
lib.
TabPageIndicator
has a single ViewGroup
child which contains the tab View
s so you can use this code to change the font:
ViewGroup vg = (ViewGroup) indicator.getChildAt(0);
int vgChildCount = vg.getChildCount();
for (int j = 0; j < vgChildCount; j++) {
View vgChild = vg.getChildAt(j);
if (vgChild instanceof TextView) {
((TextView) vgChild).setTypeface(YOUR_FONT);
}
}