【发布时间】:2014-08-15 09:14:45
【问题描述】:
这是我的代码
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="email"
/>
<EditText
android:id="@+id/inputEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/label"
/>
<Button
android:id="@+id/btnLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/inputEmail"
android:layout_alignParentLeft="true"
android:padding="0dp"
/>
</RelativeLayout>
我研究了 padding 的定义是“边框内,边框和实际视图内容之间的空间”并且是“视图内部”(Difference between a View's Padding and Margin) 我最初认为白色空间是填充(在蓝色边框内)并使用它。然而,无论填充如何,空白区域仍然存在。有谁知道如何摆脱这个空白或它叫什么?
【问题讨论】: