Reputation: 5571
I have a TabWidget and I'm trying to style the divider. (See image above)
I set the Divider Drawable of the TabWidget but the top & bottom part is unchanged. I can't figure out how to style it.
Upvotes: 1
Views: 2155
Reputation: 81
It seems that Holo theme has default 16 pixels dividerPadding for each TabWidget. I try to set it to zero in the XML but it is not working. Fortunately, it works for me to set it dynamically as below
myTabHost.getTabWidget().setDividerPadding(0);
Note: I am using android.support.v4.app.FragmentTabHost
Upvotes: 1
Reputation: 30804
All you need to do is set the dividerPadding
attribute to 0dp
in your TabWidget
.
android:dividerPadding="0dp"
Also, maybe consider switching to ActionBar.Tabs instead, just considering TabWidget
is deprecated.
Upvotes: 3
Reputation: 1728
are you talking about grey bars on the top and the bottom of the divider? use fill_parent for the drawable's height and width if that is the case!
Upvotes: 0