gpt4 book ai didi

Android——如何在使用具有自定义背景的 ListView 时删除那一点额外的填充?

转载 作者:行者123 更新时间:2023-11-29 00:45:40 24 4
gpt4 key购买 nike

我有以下布局:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#EAEAEA">

<ListView
android:id="@+id/xxx"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#464C59"
android:divider="#A4C539"
android:dividerHeight="1px">
</ListView>

<ImageView
android:id="@+id/home_bottom_bar"
android:src="@drawable/bottombar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:clickable="true"/>
</FrameLayout>

目标是在 Activity 底部有某种广告栏(其中包含项目列表)。它工作正常,除了一件事!吧台下方有一些额外的空间(它很小但足够引人注目)。顺便说一句,所有的填充都设置为 0 那么这个空间是从哪里来的呢?

谢谢!

编辑

调查问题后,发现自定义背景 (#EAEAEA) 导致了这个额外的空间。仍然不知道如何解决这个问题。

最佳答案

当你提到它是一个小的额外空间时,它可能是顶部和底部的微小渐变。由 ListView 创建,当它可滚动时。

您可以阅读关于 ListView Backgrounds 的内容,如果它是由这种特殊梯度引起的,这应该会让您了解如何修复它。

这条渐变线显然也可以删除:extra line in tab host

关于Android——如何在使用具有自定义背景的 ListView 时删除那一点额外的填充?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6574779/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com