I'm working with Navigation Drawer and i need to change the color of tint background from black to green. any ideas?
Asked
Active
Viewed 3,110 times
2 Answers
4
Try This :
yourDrawerLayout.setScrimColor(Color.GREEN);
0
You need update latest support library.
latest version- 25.4.0
Add this repository in,
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
}
}
Project level build.gradle
Update your xml
<android.support.design.widget.NavigationView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"//Change background color
android:fitsSystemWindows="false"
app:headerLayout="@layout/drawer_header"//Set your header
app:itemIconTint="@color/colorPrimary"//Change Text color
app:menu="@menu/drawer" />// set your menu items.

Santhosh
- 160
- 7
-
isn't what i asked. check the attached picture. what you say is to change to drawer background, not the tint color. – Yoni Jul 24 '17 at 13:55
-
1https://stackoverflow.com/questions/18129598/dont-display-the-overlay-with-the-android-navigation-drawer , https://stackoverflow.com/questions/26745300/navigation-drawer-semi-transparent-over-status-bar-not-working try this. – Santhosh Jul 24 '17 at 14:01