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?
So I've kind of brute forced my way into making it work, using a library called Oak (Where the TextViewWithFont is), and passing the PagerIndicator into this method:
private static void changeFonts(ViewGroup root, Activity a, String typeface) {
Typeface tf = TextViewWithFont.getStaticTypeFace(a, typeface);
for (int i = 0; i < root.getChildCount(); i++) {
View v = root.getChildAt(i);
if (v instanceof TextView) {
((TextView) v).setTypeface(tf);
} else if (v instanceof ViewGroup) {
changeFonts((ViewGroup) v, a, typeface);
}
}
}
public static void setTabPageIndicatorFont(ViewGroup root, Activity a) {
changeFonts(root, a, "DINCondBold.otf");
}
Oak if anyones interested: http://willowtreeapps.github.com/OAK/
If anyone has a better way to go about it, I'd love to get a second opinion.