我怎樣才能達到下一個佈局位置(高度)?按版式排列的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