2016-12-29 10 views
0

私は中国語のアプリを翻訳しています。翻訳を正しく合わせるために、下のボタンのレイアウトを水平から垂直に変更したいと思います。私は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> 

は誰も助けてもらえますか?ありがとう。

+0

に親と向きを一致させるために、線形レイアウト幅を変更してみてください、あなたはスクリーンショット – Rahul

答えて

0

こんにちは垂直

+0

を添付することができ、コメントなどの答えを書いてみてください。 –

+0

あなたの解決策はどちらも仲間には当てはまりません。とにかくありがとう。 – fanatek

関連する問題