How to style a tablelayout in android

风流意气都作罢 提交于 2019-12-01 10:52:20

问题


Can anyone tell me how to add a boarder to a TableLayout in android, like the one below?

http://developer.android.com/images/table_layout.png


回答1:


table layout don't display the use border use view control

<View android:id="@+id/View01" android:layout_height="1dip"
    android:layout_width="fill_parent" android:background="@color/blue_text"></View>

for vertical line give width




回答2:


TableLayout containers do not display border lines for their rows, columns, or cells. You cannot add border to table layout cells which is mentioned in the TableLayout Javadoc.



来源:https://stackoverflow.com/questions/3862136/how-to-style-a-tablelayout-in-android

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