我正在编写一个Android应用程序,我在顶部有一个EditText,底部有几个底部.我使用相对布局实现了这个.
在中间我有一个TextView.但问题是它占据了EditText下的所有空间,包括按钮所在的空间.
我希望它在按钮之前结束.我怎样才能做到这一点?

我会像这样做这样的布局:
<RelativeLayout android:width="fill_parent"
android:height="fill_parent">
<EditText android:id="@+id/top_Layout"
android:width="fill_parent"
android:height="wrap_content"
android:layout_alignParentTop="true"/>
<LinearLayout android:id="@+id/buttons"
android:width="fill_parent"
android:height="wrap_content"
android:layout_alignParentBottom="true"/>
<RelativeLayout android:id="@+id/center_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/top_Layout"
android:layout_above="@id/buttons"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3164 次 |
| 最近记录: |