I am using the HoneycombGallery sample app in the SDK and attempting to change the style of the ActionBar tabs (i.e., "Balloons", "Bikes", "Androids", "Pastries"). Using the "light" theme, the tabs have a blue underline. I simply want to make this red to match the style of an application I'm working on.
I've tried researching styles in the SDK documentation (http://developer.android.com/guide/topics/ui/actionbar.html) and other sources on the web, but I'm not quite certain that I understand what property/attribute controls this particular style of the tabs.
If anyone has a resource or code example that might demonstrate a complete custom styling of the ActionBar, I would appreciate it.
You'll want to be familiar with applying a custom theme to an activity. http://developer.android.com/guide/topics/ui/themes.html
The theme attributes android:actionBarTabStyle
, android:actionBarTabBarStyle
, and android:actionBarTabTextStyle
control the appearance of action bar tabs. The default styling uses android:background
within the tab bar style for the thin line under unselected items, and a state list drawable as the android:background
for the tabs themselves to handle focused/selected/pressed states. The background assets themselves are 9-patches that provide the underline in most cases but a more comprehensive highlight for pressed/focused states.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With