How to draw a vertical line between the columns of a multiple column list view in android?

≡放荡痞女 提交于 2020-01-25 21:30:06

问题


Right now i am working with multiple column list view in android.

My need is to draw a vertical line between the columns of a multiple column list view in android.Which means i am trying to show this multiple column list-view as like a Grid-View. The below images will make you clear about my doubts,please find it

How to achieve this concept.Suggestions?

thanks in advance!..


回答1:


<View
    android:id="@+id/view1"
    android:layout_width="fill_parent"
    android:layout_height="2dip"
    android:layout_below="@+id/te1"
    android:background="#F0FFFF" />

And check this links http://thiranjith.com/2010/02/19/how-to-display-border-lines-with-tablelayouts/

http://mobileorchard.com/android-app-development-%E2%80%93-layouts-part-two-table-and-absolute-layouts/




回答2:


I think to show data in a row, you take a textview .

So put View between every textview.

<View
     android:layout_width="5dp"
     android:layout_height="fill_parent"
     android:background="#ababab" />

So it display lie this.

Dev | 000000000000000000 | Chennai
PSl | 000000000000000000 | Mumbai


来源:https://stackoverflow.com/questions/12347003/how-to-draw-a-vertical-line-between-the-columns-of-a-multiple-column-list-view-i

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