Reputation: 3102
I have used XML to define the Theme of the action bar for my Main activity to be as follows:
<style name="AppTheme" parent="@android:style/Theme.Holo.Light" />
<style name="HomeTheme"
parent="@style/AppTheme">
<item name="android:actionBarStyle">@style/HomeActionBarStyle</item>
</style>
<style name="HomeActionBarStyle"
parent="@android:style/Widget.Holo.ActionBar">
<item name="android:displayOptions">showHome|showTitle</item>
</style>
Then in my Manifest file I have set the Theme of my activity with the defined Theme :
<activity
....
android:theme="@style/HomeTheme"
....
</activity>
everything went file as expected except two thing: 1) the border line of the action bar area is still blue 2) the background color of the action bar area is white not grey.
I am not sure what could be my mistake or this is just a bug in my emulator? I need to solve the previous two points just to have beautiful GUI
Upvotes: 1
Views: 1346
Reputation: 134664
Change
parent="@android:style/Widget.Holo.ActionBar"
to
parent="@android:style/Widget.Holo.Light.ActionBar.Solid"
By default the standard ActionBar has the blue line under it instead of the gray. The solid variant is probably what you're looking for.
Upvotes: 4