【发布时间】:2016-05-31 11:12:56
【问题描述】:
我有这个布局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:orientation="horizontal"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/mapbox_fill_white"/>
</LinearLayout>
<View
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="100dp">
</View>
</RelativeLayout>
当我添加下面的视图时,它出现在线性布局的上方,但我希望它位于布局下方。为什么它会超出布局?我怎样才能解决这个问题?谢谢。
【问题讨论】:
标签: android xml android-layout android-studio android-relativelayout