我正在翻譯中文應用程序,我想將底部按鈕佈局從水平改爲垂直,以便正確匹配翻譯。我一直在玩LinearLayout和CheckedTextView的方向和引力,但按鈕始終處於水平狀態。如何將按鈕佈局從水平改爲垂直?
這是XML代碼,
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical"
android:background="@drawable/homepage_ground" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:nav_stick="http://schemas.android.com/apk/res-auto">
<include layout="@layout/title_bar_transparent_white" />
<RelativeLayout android:layout_width="fill_parent" android:layout_height="0.0px" android:layout_weight="1.0">
<com.rockrobo.ui.RRNavigateStick android:id="@id/navigate_stick" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" />
<TextView android:id="@id/rc_starting" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10.0dip" android:text="@string/rc_starting_up" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" />
</RelativeLayout>
<LinearLayout android:layout_gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/rc_bot_margin">
<CheckedTextView android:textColor="@color/rc_button_text_color" android:gravity="center" android:id="@id/spot_clean" android:background="@drawable/rc_button_bg" android:clickable="true" android:layout_width="@dimen/rc_button_width" android:layout_height="@dimen/rc_button_height" android:layout_marginRight="@dimen/rc_bot_bar_gap" android:text="@string/rr_spot" />
<CheckedTextView android:textColor="@color/rc_button_text_color" android:gravity="center" android:id="@id/clean" android:background="@drawable/rc_button_bg" android:clickable="true" android:layout_width="@dimen/rc_button_width" android:layout_height="@dimen/rc_button_height" android:layout_marginRight="@dimen/rc_bot_bar_gap" android:text="@string/rr_clean" />
<CheckedTextView android:textColor="@color/rc_button_text_color" android:gravity="center" android:id="@id/charge" android:background="@drawable/rc_button_bg" android:clickable="true" android:layout_width="@dimen/rc_button_width" android:layout_height="@dimen/rc_button_height" android:text="@string/rr_charge" />
</LinearLayout>
可能有人幫助嗎?謝謝。
您可以將屏幕截圖 – Rahul