I'm trying to figure out how to change the font on actionbar tabs to some custom font, and for the life of me I can't figure it out. IT doesn't seem like there is any way to access the underlying TextView of a Tab object.
The other solution of course, is to define my own custom ActionBar tab layout, and set it as a custom view on the ActionBar.Tab object, but this seems quite tricky to get working also.
If I were to use the following XML layout file as my custom tab layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="center_vertical"
android:orientation="vertical" >
<TextView
android:id="@+id/text_tab"
style="@style/Widget.Sherlock.ActionBar.TabText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
The actionbar tab seems to be ignoring all of my gravity requests, and positioning the text at the top of the tab view -- which is quite different to a standard actionbar tab which has the text centered vertically by default.
If anyone could suggest either a) an easier way of supplying a custom Typeface for an actionbar tab or b) the correct layout for a custom tab view I would be very grateful.
Thanks.