2017-12-19 24 views
0

私はSamsung Galaxy Tab 3.7インチの画面サイズでアプリケーションを実行しています。さまざまな画面サイズに合わせてレイアウトを変えました。問題は、展開可能なリストビューの方向が右から左であり、左から右であることです。それは他のデバイスでは動作しますが、これは動作しません。ここでタブレットで展開可能なリストのレイアウトの方向が正しくありません

は、拡張可能なリストビューのコードです:

<?xml version="1.0" encoding="utf-8"?> 
<android.support.v4.widget.DrawerLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/drawer_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" 
    tools:openDrawer="start"> 

    <include 
     layout="@layout/app_bar_welcome" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 

    <android.support.design.widget.NavigationView 
     android:id="@+id/nav_view" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_gravity="start" 
     android:background="@color/dark_grey" 
     android:fitsSystemWindows="true" 
     app:headerLayout="@layout/nav_header_welcome" 
     > 
     <ExpandableListView 
      android:id="@+id/navigationmenu" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_marginTop="160dp" 
      android:background="@color/dark_grey" 
      android:theme="@style/MenuItems" 
      android:textSize="2dp" 
      android:groupIndicator="@android:color/transparent" 
      android:layoutDirection="rtl"/> 
    </android.support.design.widget.NavigationView> 
</android.support.v4.widget.DrawerLayout> 

ここで間違って整列した画像です。テキストは、引き出しの左側にする必要があります:

Image

答えて

0

この問題を抱えている人は、デバイスに問題があります。その解決のために、それは逆転された。私はそれと同様のモデルと別のデバイスでそれを実行し、期待どおりに働いた。

0

layoutDirectionを削除し、alignParentLeft = trueを追加します。

<ExpandableListView 
      android:id="@+id/navigationmenu" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_marginTop="160dp" 
      android:background="@color/dark_grey" 
      android:theme="@style/MenuItems" 
      android:layout_alignParentLeft="true" 
      android:groupIndicator="@android:color/transparent" 

      /> 
+0

@Pousti:悲しい顔の顔文字で「うまくいきません」というのは役に立たない回答です。/ – Pousti

+2

あなたは現在、新しいアイデアが修正されるまで推測し続けなければならないと言っています。助けとなるものに気がついたかどうか、それとも研究の新しい道筋のためのアイデアを使用するかは、それが働かないことを説明する方がはるかに優れています。 – halfer

+0

コードを共有しますか?これまでにあなたの問題に解決策を与えるのを助けてくれなかったことは何ですか? –

関連する問題