I have a tabHost and needed to change the padding and size of the text in the tabs. Does anyone know how to do this? via code or via xml? Thank you in advance.
I have a tabHost and needed to change the padding and size of the text in the tabs. Does anyone know how to do this? via code or via xml? Thank you in advance.
Speak Daniel,
You need to create a theme for your Activity that has tabHost la in AndroidManifest.xml, for example:
<activity
android:name="MyTabActivity"
android:theme="@style/CustomTheme">
Once you have done this, you need to add that theme to your style.xml (res / values / styles.xml), eg
<style name="CustomTheme" parent="@android:style/Theme">
<item name="android:tabWidgetStyle">@style/CustomTabWidget</item>
</style>
<style name="CustomTabWidget" parent="@android:style/Widget.TabWidget">
<item name="android:textAppearance">@style/CustomTabWidgetText</item>
</style>
<style name="CustomTabWidgetText"
parent="@android:style/TextAppearance.Widget.TabWidget">
<item name="android:textSize">20sp</item>
<item name="android:textStyle">bold</item>
</style>
Now you can change, text color, size, style and etc ... etc ... etc ...
Any questions on the implementation post that I can help you with.
Hugs.