1
我們如何在Android中製作嵌入式佈局?Android - 如何內聯包裝佈局?
事情是這樣的:
example http://oi51.tinypic.com/91bi3a.jpg
我試圖用相對佈局保證金的權利,但它們被分成兩列,而不是包裹對方:
<RelativeLayout
android:id="@+id/Container"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:id="@+id/Layout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="60sp">
.... //something here
</RelativeLayout>
<RelativeLayout
android:id="@+id/Layout2"
android:layout_width="60sp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true">
.... //something here
</RelativeLayout>
</RelativeLayout>
謝謝您的幫助。
如果刪除邊距,則會在layer2上渲染layer1內容。我想這是因爲android:layout_alignParentRight =「true」不會使layer2「浮動內聯」,而是「浮動下劃線」。 – markbse