简体   繁体   English

在Android版式上插入列线

[英]Insert Column Lines on Android Layout

I am trying to insert vertical lines on an Android application and am having problems on how to do it. 我正在尝试在Android应用程序中插入垂直线,但在执行操作时遇到问题。

My layout is currently designed as a Table and Row Layout which is already done. 我的布局当前被设计为已经完成的表格和行布局。 Can anyone suggest the best way to go about inserting the vertical lines on the layout that will span over several Table Row? 谁能建议最好的方法来在布局中插入跨越数个表格行的垂直线? I cannot do a background color with spacing in between because the last are different colors and dashed. 我不能在背景颜色之间使用空格,因为最后一种颜色是不同的并且是虚线。

I am not sure, but will be try using this codes. 我不确定,但是可以尝试使用此代码。 such as

for horizontal line 用于水平线

        <View
            android:layout_width="fill_parent"
            android:layout_height="1dip"
            android:layout_marginBottom="3dp"
            android:layout_marginTop="3dp"
            android:background="#000000" />

for vertical line 用于垂直线

        <View
            android:layout_width="1dip"
            android:layout_height="fill_parent"
            android:layout_marginLeft="3dp"
            android:layout_marginRight="3dp"
            android:background="#000000" />

Here you controls margin, padding dependable for your demands. 在这里,您可以控制边距,并根据自己的需求填充。 Best of luck. 祝你好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM