【发布时间】:2018-02-03 21:30:42
【问题描述】:
如何在RelativeLayout 组中的视图之间添加空格?
在使用Layout_marginBottom 和paddingBottom 对齐Button 顶部的TextView 之后,我试图在TextView 和Button 之间添加一个空格,但它们都不起作用。
代码如下:
<TextView
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:text=" Drawing ... "
android:gravity="center_horizontal"
android:layout_alignTop="@id/reset"
android:layout_marginBottom="50dp" />
<Button
android:id="@+id/reset"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:onClick="reset"
android:text="Reset" />
谢谢。
【问题讨论】:
标签: android xml alignment android-relativelayout