Reputation: 313
I use this library: https://github.com/mikepenz/MaterialDrawer
I would like to have a right NavigationDrawer with a ListView (or a lot of items) inside and I get items from DB inside the Fragment and when user click on items on the NavigationDrawer I get data from another DB and show it on Fragment.
and I have a questions: is possible to create a right Drawer inside a Fragment? or is better to create a new right Drawer in MainActivity and change the navigation item inside the Fragment?
Upvotes: 1
Views: 56
Reputation: 100
As from design point of view, you should always use left sided Navigation Drawer, it is possible to make it right sided, but its recommended to leave it at the left side.
Another thing is that you do not need to use 3rd party navigation drawer libraries.Since there is a Design library by google, which supports the material design navigation view.
Here is a link for the library: https://developer.android.com/tools/support-library/features.html
And here is another useful link: https://guides.codepath.com/android/Design-Support-Library
Here is the link for the Navigation Drawer: https://guides.codepath.com/android/Fragment-Navigation-Drawer
As for your question the appropriate way is to create the drawer always in the main activity onCreate() method.
Upvotes: 1
Reputation: 10052
Just use brand new Navigation View
from recenlty released Android Design Support Library by Google.
Here are links for you:
To have Navigation View
on the right, just set android:layout_gravity
to end
.
Upvotes: 1