我遇到了一個問題,我無法在我的應用佈局中放置一個按鈕...我搜索了有關此信息的信息,但所有人說些不同的東西,我只是困惑...有人可以告訴我我必須做什麼?見下圖:該按鈕正在交換如何在我的佈局中將按鈕放在我想要的位置
<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