tmbz
tmbz

Reputation: 163

Android: remove shadow from bottom navigation

When placing a container below my bottom navigation, it is partly covered by the gray shadow from the navigation, even after adding content to the container. How do I remove the shadow? screenshot

Upvotes: 16

Views: 10011

Answers (2)

William
William

Reputation: 51

If you are using above Api-level 28 you can use

android:outlineAmbientShadowColor="@android:color/transparent"
android:outlineSpotShadowColor="@android:color/transparent"

Upvotes: 5

AskNilesh
AskNilesh

Reputation: 69689

Use app:elevation="0dp" to hide shadow from from bottom navigation

<android.support.design.widget.BottomNavigationView
    android:id="@+id/bottom_navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:background="@android:color/white"
    app:elevation="0dp"
    app:menu="@menu/bottom_navigation_main" />

Upvotes: 36

Related Questions