我遇到了一个问题,我无法在我的应用布局中放置一个按钮...我搜索了有关此信息的信息,但所有人说些不同的东西,我只是困惑...有人可以告诉我我必须做什么?见下图:该按钮正在交换如何在我的布局中将按钮放在我想要的位置
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/uc" >
<Button
android:id="@+id/button1"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignLeft="@+id/button2"
android:layout_alignParentTop="true"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_below="@+id/button1"
android:layout_centerHorizontal="true"
android:layout_marginTop="98dp"
android:text="Button" />
尝试使用LinearLayout而不是相对布局?那可能就是这样! –
垂直或水平! – Mursid