Android-导航抽屉-滚动视图无滚动
我的导航抽屉有问题 我无法在导航抽屉中滚动。。。但是我的listview中有足够的项目 我已经检查了xml,但还没有找到问题的原因 下面是定义ListView的“主”XML:Android-导航抽屉-滚动视图无滚动,android,android-layout,android-scrollview,navigation-drawer,Android,Android Layout,Android Scrollview,Navigation Drawer,我的导航抽屉有问题 我无法在导航抽屉中滚动。。。但是我的listview中有足够的项目 我已经检查了xml,但还没有找到问题的原因 下面是定义ListView的“主”XML: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com /apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com /apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Hauptmenue_extended" >
<ListView
android:id="@+id/left_drawer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:background="#fff" />
</android.support.v4.widget.DrawerLayout>
有人能帮我吗 尝试使用中的XML代码。我觉得有一些不同之处。例如,将ListView高度设置为匹配父项而不是换行内容(我知道这很奇怪),并确保包含内容的框架布局
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
listview不滚动!你知道吗?你找到答案了吗?
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>