2017-01-20 3 views
0

このコードは例です。アンドロイドスタジオの「プレビュー」タブでは、左側に「A」、右側サイズにBが表示されています。ただし、Android搭載デバイスにアプリをインストールすると、「A右側は「B」、左側は「B」である。アンドロイドのスタジオで。私のアンドロイドデバイスでアプリを実行すると、ビューが水平に反転しますか?

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:orientation="horizontal" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 

    <LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 

     <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="A" 
     android:textSize="16sp/> 

    <LinearLayout/> 




    <LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 

     <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="B" 
     android:textSize="16sp/> 

    <LinearLayout/> 


<LinearLayout/> 
+2

デバイス上で言語設定を確認してください。 Android Studioのデフォルトが左から右の場合は、おそらく右から左の言語を端末で使用しています。 –

答えて

関連する問題