我想重新定位我的android應用程序佈局,我有2個EditText和一個按鈕。XML Android定位佈局
我想把它們放在彼此的下面,它現在並排。 這裏是我的代碼:
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:background="@drawable/borderlayout" >
<EditText
android:id="@+id/titleText1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:hint="Title" />
<EditText
android:id="@+id/descriptionText1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/titleText1"
android:layout_weight="1"
android:hint="Description" />
<Button
android:id="@+id/inputbutton1"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_below="@+id/descriptionText1"
android:layout_weight="1"
android:background="@drawable/custom_button" />
</TableRow>
,這是它的外觀,當我運行(廣東話後的圖像又因爲低銷售代表) http://prntscr.com/3qyjpv
它的工作!謝謝 – meskh