我怎样才能达到下一个布局位置(高度)?按版式排列的Android布局
当前代码:
<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"
tools:context=".MainActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"></ListView>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="Новая заметка"/>
</RelativeLayout>
</RelativeLayout>
请问您是否需要清楚“layout by layout”是什么意思? – Gumbo 2015-04-04 16:24:17
我想布局有高度位置,如表中的表行。我的意思是,布局高度1 +布局高度2 =活动高度(一个接一个) – FSou1 2015-04-04 16:25:42
的确,“layout by layout”的含义并不完全清楚,但您的图片布局可以通过使用一个父“LinearLayout”方向和两个孩子('ListView'和'Button')与指定的权重。 – AndroidEx 2015-04-04 16:27:20