【问题标题】:How can i remove white blank space from bottom of scrollView in android studio如何从android studio中的scrollView底部删除白色空白区域
【发布时间】:2018-06-04 05:49:02
【问题描述】:

我像这样在一个 ScrollView 中使用了两个 ListView。但我的问题是滚动视图的底部有一个白色的spcae `

<ScrollView
        android:id="@+id/ss"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/sss"
        android:layout_weight="1"
        android:fillViewport="true"
        android:fadingEdgeLength="0dp">
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="fill_parent"
            android:layout_alignParentTop="true">
            <ListView
                android:id="@+id/listView1"
                android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="fill_parent"
                android:divider="@null"
                android:dividerHeight="1dp"
                android:overScrollMode="never"
                android:layout_weight="1"/>
            <ListView
                android:id="@+id/listView"
                android:visibility="gone"
                android:layout_width="match_parent"
                android:layout_height="fill_parent"
                android:divider="@null"
                android:dividerHeight="1dp"
                android:layout_below="@id/listView1"
                android:overScrollMode="never"/>
        </RelativeLayout>
    </ScrollView>

But last time there you can see too much blank space by notice scroll bar on right Middle From top

请帮帮我。谢谢!

【问题讨论】:

  • 尝试将两个列表视图的高度更改为 wrap_content。

标签: android android-layout listview


【解决方案1】:

尝试添加这个

android:fillViewport="true"

并将内部布局高度也匹配父项。

【讨论】:

  • 请发布您的完整 xml 代码。因为您上面的代码对我有用...这就是为什么我认为还有另一个问题。
  • 我用相对布局覆盖了布局,也使用了工具栏
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-12-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多