Navigation drawer starts from right side

前端 未结 3 1097
猫巷女王i
猫巷女王i 2021-01-29 01:47

How can i make the navigation drawer open from the right to the left?

Main.xml



        
3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-29 02:17

    it does change , only two things to do ,

    After addig a new activity to your android app from android studio->file->new->activity ->Navigation Draw....

    you have to change android:layout_gravity="right" in main layout's android.support.design.widget.NavigationView and drawer.closeDrawer(GravityCompat.END); in your OnNavigationItemSelected() function in main activity .

提交回复
热议问题