Как я могу иметь ListView внутри NestedScrollView
Я создал приложение со страницей, которая должна динамически загружать контент из веб-службы. Я хочу иметь список, который можно прокручивать вместе с линейным макетом внутри NestedScrollView. Но когда содержимое загружается в просмотр списка, оно не растягивается до полной высоты.
Вот мой код.
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.myquestionth.myquestionth10.Profile2Activity"
tools:showIn="@layout/activity_profile2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="400dp"
android:background="#BBBBBB" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Media heading"
android:id="@+id/textView2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis."
android:id="@+id/textView8" />
</LinearLayout>
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#70bcf5" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
Я искал, что прокрутка не может быть вложенной. Это пример, который мне нужен в соответствии с моим дизайном макета со страницы обзора Google Play. Какой метод они используют? Предложите мне, если я сделаю что-то не так. Большое спасибо.
Вот что я хочу.