GrafOrlov GrafOrlov - 2 months ago 18
Android Question

Android NavigationView remove elevation

I cannot remove elevation (shadow) of

NavigationView
for Lollipop and higher versions.
I added
mDrawerLayout.setScrimColor(Color.TRANSPARENT);
to my
DrawerLayout
, but it affects on pre-Lollipop versions. I also tried to add
app:elevation="0dp"
and
android:elevation="0dp"
to my
NavigationView
but unsuccessful.

enter image description here

I need to get the result of android 4 on android 6.

Answer

I have found the solution:

mDrawerLayout.setDrawerElevation(0);

enter image description here

Comments