问题
My ListView does not scroll to the end of the screen.
It stops right at the top of the last item.
Below are the two codes I have been playing around with to get it to scroll to the end.
The tab layout is supposed to scroll too, to make space for the ListView to scroll till the end.
This feature works on all the other Fragments but won't work with the ScrollView.
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
tools:context="com.application.sweetiean.stlservicing.Serv_OverviewFragment">
<!-- TODO: Update blank fragment layout -->
<LinearLayout
android:id="@+id/serv_OverviewTab"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical">
<ListView
android:id="@+id/displayListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
and
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
tools:context="com.application.sweetiean.stlservicing.Serv_OverviewFragment">
<!-- TODO: Update blank fragment layout -->
<ListView
android:id="@+id/displayListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
I need some help.
来源:https://stackoverflow.com/questions/34227784/why-wont-my-nested-scrollview-scroll-till-the-end