Why won't my nested ScrollView scroll till the end?

一世执手 提交于 2019-12-12 21:02:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!