LinearLayout中的项目位置
答
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal">
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" />
答
最好在这种情况下使用RelativeLayout。您刚刚根据您的观点相对彼此的项目描述了您的预期结果。使用比你想象的更简单。
http://developer.android.com/resources/tutorials/views/hello-relativelayout.html
+0
是啊,我以前用过的RelativeLayout,问题是,我想在我的按钮都使用重量。现在我在一个LinearLayout和一个RelativeLayout中的TextView中有我的按钮,但它仍然不会像我想要的那样做。 – Carlj901
工作,谢谢。 – Carlj901
我的荣幸。接受回答并关闭问题 –