我希望有一些部分,即至少是一种将2个逻辑部分分开的条状物。最重要的是我有edittext字段和底部我有textview。我之间需要一些分隔符。怎么做?请注意,edittext和textview都位于同一tablelayout的不同行中。
提前致谢!
答案 0 :(得分:0)
使用所需的android:layout_width
和android:layout_height
添加视图,您可以相应地构建具有不同厚度的线条。
如果您想使用水平线分隔两个视图,那么请按照代码段帮助您:
水平线:
<EditText/>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@android:color/black" />
<TextView/>
垂直线:
<EditText/>
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="@android:color/black" />
<TextView/>
到目前为止你的表格有点关注:
<TableLayout>
<TableRow>
<EditText/>
</TableRow>
<TableRow>
<View/>
</TableRow>
<TableRow>
<TextView/>
</TableRow>
</TableLayout>