http://developer.android.com/training/implementing-navigation/nav-drawer.html
According to this doc, it doesn't say if it is possible to implement drawer from right hand side. Is it even possible? :(
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml. Step 3 − Add the following code to res/layout/nav_header_main.
The navigation drawer is a UI panel that shows your app's main navigation menu. The drawer appears when the user touches the drawer icon in the app bar or when the user swipes a finger from the left edge of the screen.
The navigation drawer slides in from the left and contains the navigation destinations for the app. The user can view the navigation drawer when the user swipes a finger from the left edge of the activity. They can also find it from the home activity by tapping the app icon in the action bar.
The NavigationDrawer can be configured to pull out from the left, right or both. The key is the order of appearance of the drawers in the XML declaration, and the layout_gravity attribute. Here is an example:
<android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" > <FrameLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:baselineAligned="false" > </FrameLayout> <!-- Left drawer --> <ListView android:id="@+id/left_drawer" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="left" android:choiceMode="singleChoice" /> <!-- Right drawer --> <ListView android:id="@+id/right_drawer" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="right" android:choiceMode="singleChoice" /> </android.support.v4.widget.DrawerLayout>
Here is the documentation on the drawer and it appears that you can configure it to pull out from the left or right.
Drawer positioning and layout is controlled using the android:layout_gravity attribute on child views corresponding to which side of the view you want the drawer to emerge from: left or right. (Or start/end on platform versions that support layout direction.)
http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With