In meiner App verwende ich eine ListView
und es ist in einem NestedScrollView
. Wenn ich height
von ListView
auf einstelle, deckt es nicht den ganzen Bildschirm ab. Ich möchte, dass ListView
den gesamten Bildschirm abdecken.match_parent funktioniert nicht für ListView, wenn ListView in NestedScrollView ist
Meine XML-Datei:
<?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>
Können Sie den Screenshot von Listview mit Daten teilen? –
Sorry, aber mein Ruf ist weniger. Zum Hinzufügen von Screenshots wird mindestens 10 Reputation benötigt. –
Wie @Reza erwähnt, sollten Sie keine scrollbare Ansicht wie Listview in einer anderen scrollbaren Ansicht wie scrollview verwenden. Warum möchten Sie, dass sich listview in NestedScrollView befindet? –