当前位置: 动力学知识库 > 问答 > 编程问答 >

Android Navigation Drawer RTL crash

问题描述:

I'm using appcompact for navigation drawer, everything is working perfectly as following, but when i try to change the drawer from RTL using android:layout_gravity="start" the app compiles but on the click of the icon it crashes any idea what's causing the crash and how to make it RTL

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical">

<android.support.v7.widget.Toolbar

android:id="@+id/toolbar"

android:layout_width="match_parent"

android:layout_height="64dp"

android:background="@color/color_primary"

android:minHeight="?attr/actionBarSize" />

<android.support.v4.widget.DrawerLayout

android:id="@+id/drawer_layout"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_gravity="start">

<!-- Main layout -->

<FrameLayout

android:id="@+id/main_fragment_container"

android:layout_width="match_parent"

android:layout_height="match_parent" />

<!-- The navigation drawer -->

<ListView android:id="@+id/left_drawer"

android:layout_width="240dp"

android:layout_height="match_parent"

android:layout_gravity="end"

android:choiceMode="singleChoice"

android:divider="@android:color/transparent"

android:dividerHeight="0dp"

android:background="#ccc"/>

</android.support.v4.widget.DrawerLayout>

here's the error log

Process: inducesmile.com.androidnavigationdrawer, PID: 15182

java.lang.IllegalArgumentException: No drawer view found with gravity LEFT

at

分享给朋友:
您可能感兴趣的文章:
随机阅读: