I am using Android native action bar. I would like to add my own drawable resource as the background of the action bar. So, I made a theme like following:
res/values/themes.xml :
<style name="Theme.MyStyle" parent="android:style/Theme.Holo.Light">
<item name="android:background">@drawable/my_bg</item>
</style>
Then, in AndroidManifest.xml file I add this style to my application:
<application
android:debuggable="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.MyStyle"
>
<activity ...>
<activity .../>
...
</application>
BUT, the background drawable is applied NOT ONLY to action bar BUT ALSO to all fragments’ content. why?
My 2nd question is, how to customize the overflow icon and the left-most “up” button on action bar??
try
customize the logo using
setDisplayUseLogoEnabled(boolean)More info