Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 722
GrafOrlov Avatar asked Feb 15 '26 07:02

GrafOrlov


1 Answers

I have found the solution:

mDrawerLayout.setDrawerElevation(0);

enter image description here

like image 146
GrafOrlov Avatar answered Feb 16 '26 20:02

GrafOrlov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!