[英]How to change the background color of navigation drawer android?
Actually, this is a layout for the navigation activity and in the XML file we can edit it.实际上,这是导航活动的布局,我们可以在 XML 文件中对其进行编辑。
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/motivationQuoteColor" HERE IS THE CHANGE I NEED TO DO
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_front_navigation"
app:itemTextColor="#000000"
app:menu="@menu/activity_front_navigation_drawer">
</com.google.android.material.navigation.NavigationView>
summary, go to that activity where we slide left to right then the drawer opens, then open the layout file, and then you have to go to the code above and then change the code there.总结,转到我们从左向右滑动的那个活动,然后抽屉打开,然后打开布局文件,然后你必须转到上面的代码,然后在那里更改代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.