Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android layout 如何在Android布局XML中复制彩色分隔符?_Android Layout - Fatal编程技术网

Android layout 如何在Android布局XML中复制彩色分隔符?

Android layout 如何在Android布局XML中复制彩色分隔符?,android-layout,Android Layout,我需要复制一个如下所示的旧表单: 安卓系统中设置屏幕用户名和密码部分的“彩色分隔符”是什么?图像视图?文本视图?在我未来的可绘制文件夹中是否有某些内容?还是 更新 Der Golam的第一个示例非常完美,只是我需要一些空间,所以我在顶部分隔符之后和底部分隔符之前添加了空格元素: <Space android:layout_width="wrap_content" android:layout_height="6dip" /> 这与放置一般视图一样简单: <!

我需要复制一个如下所示的旧表单:

安卓系统中设置屏幕用户名和密码部分的“彩色分隔符”是什么?图像视图?文本视图?在我未来的可绘制文件夹中是否有某些内容?还是

更新 Der Golam的第一个示例非常完美,只是我需要一些空间,所以我在顶部分隔符之后和底部分隔符之前添加了空格元素:

<Space
    android:layout_width="wrap_content"
    android:layout_height="6dip" />

这与放置一般视图一样简单:

<!-- A horizontal line - play with the color and with the height -->
<!-- Play with margins, too -->
<View
    android:layout_width="match_parent"
    android:layout_height="2dp"
    android:background="#f800"
/>

<!-- A vertical line - play with the color and with the width -->
<!-- This can be nice as a ListView Item "bullet" -->
<View
    android:layout_width="2dp"
    android:layout_height="match_parent"
    android:background="#f008"
/>

您可能需要使用更复杂的填充,例如渐变…
好奇?想试试吗?
以下是一个简单的教程,以防万一:

<!-- A horizontal line - play with the color and with the height -->
<!-- Play with margins, too -->
<View
    android:layout_width="match_parent"
    android:layout_height="2dp"
    android:background="#f800"
/>

<!-- A vertical line - play with the color and with the width -->
<!-- This can be nice as a ListView Item "bullet" -->
<View
    android:layout_width="2dp"
    android:layout_height="match_parent"
    android:background="#f008"
/>