Android导航抽屉不滚动
我尝试过使用抽屉布局和抽屉布局内部的导航视图来实现导航抽屉。但我的导航视图只显示第一个屏幕上的元素,不向下滚动 这是我正在使用的XML:Android导航抽屉不滚动,android,scroll,scrollview,navigation-drawer,Android,Scroll,Scrollview,Navigation Drawer,我尝试过使用抽屉布局和抽屉布局内部的导航视图来实现导航抽屉。但我的导航视图只显示第一个屏幕上的元素,不向下滚动 这是我正在使用的XML: <?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:app="http://schemas.android.com/apk/res-auto"
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start"
>
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_height="match_parent"
android:layout_width="wrap_content"
app:itemTextColor="#FFFFFF"
app:itemIconTint="#FFFFFF"
android:layout_gravity="end"
android:paddingBottom="0dp"
android:paddingTop="24dp"
android:background="#1F262F"
app:menu="@menu/menu_drawer"
>
</com.google.android.material.navigation.NavigationView>
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.drawerlayout.widget.DrawerLayout>
我尝试过在导航视图之外使用滚动条,我也尝试过用listview填充导航视图,但是没有一个可以使导航抽屉滚动
我做错了什么?请提供解决方案