我不知道如何嵌套不同的佈局。 我想要一個listlayout和一個表格佈局並排。我想ListLayout左和表佈局上listlayout的右側例如嵌套不同的佈局
<ListView android:id="@android:id/list" android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:focusable="true"
android:focusableInTouchMode="true" />
,一個tablelayout
<TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
<TableRow>
<TextView
android:layout_column="1"
android:text="Open..."
android:padding="3dip" />
<TextView
android:text="Ctrl-O"
android:gravity="right"
android:padding="3dip" />
</TableRow>
<TableRow>
<TextView
android:layout_column="1"
android:text="Save..."
android:padding="3dip" />
<TextView
android:text="Ctrl-S"
android:gravity="right"
android:padding="3dip" />
</TableRow>
</TableLayout>
但是,如果我不喜歡這樣的話,我沒有得到listlayout和表格佈局上左邊。我只是一個初學者,可能是我完全錯了。任何人都可以引導我,請其緊急....
我試圖把代碼i的RelativeLayout的上述顯示但它沒有幫助:( –
Jeena
2011-04-28 14:57:09
@Jeena,當使用RelativeLayout時,你必須告訴對象在哪裏放置themselv es,使用「below」,「toRightOf」,「toLeftOf」等。 – 2011-04-29 16:59:56