我正在嘗試編輯佈局文件,以便兩個按鈕並排排列,而不是一個在另一個之上。以下是從佈局文件代碼:編輯佈局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="225dp"
android:layout_height="wrap_content"
android:background="@color/dark_yellow"
android:orientation="vertical"
android:padding="12dip" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingBottom="12dip"
android:text="@string/dialog_text"
android:textColor="@color/light_yellow"
android:textSize="@dimen/font_medium" />
<Button
android:id="@+id/btn_go_to_new_App"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="Go"
android:text="@string/btn_go" />
<Button
android:id="@+id/btn_stay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="stay"
android:text="@string/btn_stay_at_lifecycle" />
</LinearLayout>
截至目前,btn_go
正在出現上述btn_stay_at_lifecycle
。我需要做什麼才能使btn_stay_at_lifecycle
出現在btw_go
的右側?
謝謝!
現在選擇的答案:) – 2012-09-27 06:57:22