Reputation: 516
I want to set backgroundColor as white for bottom navigation view. But there is a top shadow.
I want to change this color. How can I do this?
Upvotes: 0
Views: 2055
Reputation: 1213
Use the code Create shadow.xml in drawable
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="#757575"
android:endColor="@android:color/transparent"
android:angle="90"/>
</shape>
Call this in layout xml
<View
android:background="@drawable/dgb"
android:layout_width="match_parent"
android:layout_height="@dimen/_8sdp"/>
Upvotes: 0
Reputation: 23404
Try setting app:elevation="0dp"
. It should remove the shadow
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottomBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
app:menu="@menu/bottom_menu"
app:elevation="0dp"/>
Then take a 9 patch image with your color shadow and set it as background
Upvotes: 0