在我的应用程序中,我正在使用ListView
并将其放置在NestedScrollView
中。当我将ListView
的height
设置为match_parent
时,它并没有占满整个屏幕。我希望ListView
能够覆盖整个屏幕。
我的XML文件:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:isScrollContainer="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
android:clipToPadding="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="1dp">
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:divider="@null" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>