表格行划分 [英] TableRow division

查看:100
本文介绍了表格行划分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我的应用程序有一个包含许多表行的表布局,但是如何在它们之间进行划分呢?例如:一张桌子,一行之后,另一张桌子,依此类推.有一些财产吗?

Well, my app has a tablelayout with a lot of tablerows, but how can I put a division between them? Eg: a tablerow, after that a line, after that another tablerow and so on. Is there some property for that?

推荐答案

Android 3.0及更高版本中已提供.在您的TableLayout上:

There is in Android 3.0 and forward. On your TableLayout:

android:divider="?android:attr/dividerHorizontal"
android:showDividers="middle"

在Android 3.0之前,您应该能够将虚拟视图用作每行之间的分隔符,如下所示:

Before Android 3.0 you should be able to use dummy views as dividers between each row like this:

<View android:layout_width="match_parent"
      android:layout_height="1dp"
      android:background="?android:attr/listDivider" />

这篇关于表格行划分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆