如何删除线插图中的机器人2列表视图? [英] how to remove line inbetween two listviews in android?
本文介绍了如何删除线插图中的机器人2列表视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用两个的ListView
就像这样:
<ListView
android:id="@+id/ListView"
android:text="@string/Website"
android:layout_height="30px"
android:layout_width="150px"
android:scrollbars="none"
android:transcriptMode="normal"/>
<ListView
android:id="@+id/ListView1"
android:text="@string/Website"
android:layout_height="30px"
android:layout_width="150px"
android:scrollbars="none"
android:transcriptMode="normal"/>
有两个的ListView
秒之间空一行。我该如何去除呢?
There is one blank line between the two ListView
s. How do I remove it?
推荐答案
要删除项目之间的分隔符在同一个ListView中,这里是解决方案:
To remove the separator between items in the same ListView, here is the solution:
getListView().setDivider(null);
getListView().setDividerHeight(0);
developer.android.com#的ListView
或者,如果你想这样做的XML:
Or, if you want to do it in XML:
android:divider="@null"
android:dividerHeight="0dp"
这篇关于如何删除线插图中的机器人2列表视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文