【发布时间】:2018-06-01 12:57:19
【问题描述】:
我正在三星 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>
这是对齐错误的图像。文本应该在抽屉的左侧:
【问题讨论】:
标签: android android-layout layout expandablelistview tablet