问题描述
我发现这个隐藏页脚视图中的ListView?。由于号Yoni poited正确,您可以通过包装成一个的FrameLayout
和<$ C躲在的ListView
A头$ C> setVisibility()的内部查看
到 View.GONE
。这个作品几乎适合我,但是:由于的FrameLayout
仍然存在,的ListView
增加了两个分频器所显示的列表中。好像有两个分隔的高度单一的分频器。有没有一种方法来隐藏的ListView
单分?也许这是可以改变分频器的颜色与背景颜色,这将是对我很好了。任何完成其他的想法?完善!
I found this Hide footer view in ListView?. As Yoni poited out correctly, you can hide a header in a ListView
by wrapping it into a FrameLayout
and setVisibility()
of the inner View
to View.GONE
. This works almost perfect for me, BUT:As the FrameLayout
still exists, the ListView
adds two dividers to the displayed list. It seems like a single divider with a height of two dividers. Is there a way to hide a single divider of a ListView
? Maybe it's possible to change the divider's color to the background, that would be fine for me, too. Any complete other ideas? Perfect!
请帮助我。我并不热衷于花费两个小时的试验和错误。
Please help me. I'm not keen on spending two more hours of trial and error.
非常感谢!
推荐答案
您可以改变分频器的颜色是这样的:
you can change the dividers color like this:
<ListView
android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:divider="@android:color/transparent"
android:dividerHeight="2px"/>
这篇关于隐藏的ListView页眉/隐藏单分频器的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!