2016-12-29 107 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