I’ve been working with the libraries ActionBarSherlock and SlidingMenu. It has been working pretty well, but I noticed a weird color right under the ActionBar. It looks like this:
https://i.stack.imgur.com/IMBZA.jpg
My background color is #E7E7E7, and I don’t know where this #DEDFDE comes from. I noticed the color in the SlidingMenu Example application ( https://play.google.com/store/apps/details?id=com.slidingmenu.example ) and I really don’t like it. I’m not sure what code to post so there is my setup of the SlidingMenu
sm = new SlidingMenu(this);
sm.setMode(SlidingMenu.LEFT);
sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
sm.setFadeEnabled(false);
sm.setBehindScrollScale(0.0f);
sm.setFadeEnabled(true);
sm.setFadeDegree(0.5f);
sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
SlidingMenu.attachSlidingMenu(this, sm, true);
sm.setMenu(R.layout.lists_frame);
My ActionBar Java setup
ActionBar mActionBar = getSupportActionBar();
mActionBar.setHomeButtonEnabled(true);
mActionBar.setLogo(R.drawable.actionbar_lists);
mActionBar.setTitle("Choose a list");
And my styles.xml
<style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar">
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
</style>
<style name="Widget.MyTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
<item name="android:background">#ff0099ff</item>
<item name="background">#ff0099ff</item>
</style>
I would of course like to get rid of it, and I tried searching but without an answer. Hope you guys can help, and if you need any other code snippets, please say so.
It should also be said that if I use
SlidingMenu.attachSlidingMenu(this, sm, false);
the color also appears on the view below.
It seems like it is caused by the shadow that is often placed under the action bar. The shadow is defined in the theme in
android:windowContentOverlayitem (windowContentOverlayforActionBarSherlock).ActionBarSherlockhas it defined by default forTheme.Sherlock.Light.DarkActionBar.If you want to get rid of id, just cancel it in the theme: