I'm having transparent actionbar and i just set a background image.
My Actionbar is now transparent but it doesn't shows the layout background image in actionbar. it shows like the image attached
Please help me :-( Thanks in Advance!
Set below style to your action bar.
<style name="Theme.MyTheme" parent="android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:background">#64000000</item>
</style>
or
Call setStackedBackgroundDrawable() on your ActionBar:
getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
ActionBar actionBar = getActionBar();
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#330000ff")));
actionBar.setStackedBackgroundDrawable(newColorDrawable(Color.parseColor("#550000ff")));