I’m using Tab Layout and I want to do two things:
- set the color so it won’t be gray
- reduce the text size, the text doesn’t fit.
also, the text is in most part on the icon instead of below it (can I do something about it ?).
Any ideas on how can I do this ?
edit: I’m creating a new tab in this manner:
spec = tabHost.newTabSpec("artists").setIndicator(
"Artists",
res.getDrawable(R.drawable.ic_tab_artists)
).setContent(intent);
tabHost.addTab(spec);
I want to change the size of the word “artists”.
You should define your own view.
and you can change the text size here tv.setTextSize(20)”
tab_indicator.xml. you can change the text size here also android:textSize=”20dip”. it is possible to set the background color here. android:background=”@color/back_color_selector_tab”
back_color_selector_tab.xml is an xml for automatic changes in background color in different states.
a sample of state_orange.xml