Skip to content Skip to sidebar Skip to footer

Navigation Drawer View Background Color Showing Black Background

I am facing a weired issue, I have a navigation drawer activity in my app, and i found some errors with toolbar when app running on below API 21 i have fixed it by changing toolbar

Solution 1:

Try to change the background-tint:

<android.support.design.widget.NavigationView
 android:id="@+id/nav_view"
 android:layout_width="wrap_content"
 android:layout_height="match_parent"
 android:layout_gravity="start"
 android:fitsSystemWindows="true"
 app:headerLayout="@layout/nav_header_home_page_new"
 app:menu="@menu/activity_home_page_new_drawer"
 android:backgroundTint="#ffffff"/>

Solution 2:

just use theme for NavigationView :

 <com.google.android.material.navigation.NavigationView
            android:id="@+id/navigation"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="false"
            app:headerLayout="@layout/navigation_header"
            app:itemIconTint="@color/button_background"
            app:itemTextAppearance="@style/NavigationTextAppearance"
            app:menu="@menu/navigation_menu"
            android:theme="@style/NavigationViewTheme"
            >

here's the theme:

<style name="NavigationViewTheme">
    <item name="android:background">@color/root_background</item>
</style>

Post a Comment for "Navigation Drawer View Background Color Showing Black Background"