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