Search code examples
androidandroid-actionbar

How to remove dark line and gradient under action bar


How do i remove this line under the action bar? actionbar black line
(source: android.com)

I would like it to be a solid color like the way google+ or the below app is: solid color actionbar bottomline

i have tried

<item name="windowContentOverlay">@null</item>
<item name="android:windowContentOverlay">@null</item>

But that doesnt seem to remove it. All i want to do is just use a solid color, no tiled image, no gradient.


Solution

  • they this code it is override Background of actiobar

    ActionBar actionBar = getSupportActionBar();
    actionBar.setBackgroundDrawable(getResources().getDrawable(
                R.drawable.actionbar));
    

    drawable/actionbar.xml

    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" >
    <solid android:color="#06B697" />
    </shape>