What's the purpose of tools:openDrawer=“start” when creating a DrawerLayout (with NavigationView) from the wizard?

前端 未结 2 603
既然无缘
既然无缘 2021-01-07 22:40

Creating an activity with navigation drawer in Android Studio causes this to be shown in the XML code:



        
2条回答
  •  甜味超标
    2021-01-07 23:11

    It makes the navigation drawer visible on the preview screen in Android Studio essentially mimicking the user swiping the drawer onto the screen.

    Without this attribute, you would see only the content view of the main screen.

    I haven't tried it but I suspect substituting "start" for "end" would make the drawer on the right of the screen open (assuming there is one of course).

提交回复
热议问题