How to set divider between columns in tablelayout?

后端 未结 7 1874
南旧
南旧 2020-12-10 06:07

I want to create a table with column dividers. I want to divide my columns with a vertical bar image. To achieve this I have used \"android:divider=\"@drawable/abc\"

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 06:49

    since tablelayout does not provide this directly, one posibble way might be a framelayout. place the desired table above another background_table wich only have one row and "match_parent" for height/width. add 3 columns with desired layout_weights. add vertical divider-imageview to second column. the main table should also use the same layout_weihts +margin in it`s rows to look good.

    horizontal divider possibly could be realized by adding an imageview between the "to-be-separated" tablerows.

    not tested yet, just an approach

    ornay

提交回复
热议问题