【问题标题】:Insert Column Lines on Android Layout在 Android 布局上插入列行
【发布时间】:2012-09-11 02:47:25
【问题描述】:

我正在尝试在 Android 应用程序上插入垂直线,但在操作时遇到了问题。

我的布局目前设计为表格和行布局,这已经完成。谁能建议在布局上插入跨越多个表行的垂直线的最佳方法?我不能使用中间有间距的背景颜色,因为最后一种颜色不同且虚线。

【问题讨论】:

    标签: java android android-layout layout user-interface


    【解决方案1】:

    我不确定,但会尝试使用此代码。比如

    水平线

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

    垂直线

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

    您可以在此处控制边距,填充可满足您的需求。祝你好运。

    【讨论】:

      猜你喜欢
      • 2021-09-23
      • 2012-08-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-07
      • 2014-03-01
      • 2011-07-30
      • 2019-07-19
      相关资源
      最近更新 更多