TableRow division

自闭症网瘾萝莉.ら 提交于 2020-01-01 17:07:39

问题


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?


回答1:


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

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

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" />


来源:https://stackoverflow.com/questions/10542852/tablerow-division

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!