I am trying to get around this in the action bar, but from what I see in the title, it is basically a TextView, but I need to place the image instead of plain text. I am trying to install it in style themes.xml as follows:
<item name="android:actionBarStyle">@style/MyActionBar</item>
And then I defined this style
<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar"> <item name="android:background">@drawable/action_background</item> <item name="android:titleTextStyle">@style/ActionbarTitleStyle</item> </style>
I thought I could define a background for the name, but even if I do it not what I want, try getActionBar (). setCustomView (layout); but I realized that my actionbar is null before calling setContentView, and I need it in the base class.
PD. I only need to take care of HONEYCOMB and Higher, so if you do not offer an implementation of Sherlock or Jonanilson.
android android-actionbar customization
Necronet
source share