【发布时间】:2011-09-28 04:00:02
【问题描述】:
我们如何在 Android 中制作内联布局?
类似这样的:
我尝试在相对布局中使用边距,但它们被分成 2 列而不是相互包裹:
<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>
【问题讨论】:
标签: android layout inline word-wrap