I want to create Navigation Drawer
in all of my Activities
(not fragments).
Tricky part is it should be one common Drawer. i.e. the list items must be same.
In drawer the current opened activity should be highlighted bold & disabled in the ListView
, while other activities should be in normal text and enabled.
After going thru many examples, like this, I've come up with 2 approaches:
Either make different Navigation Drawer in each activity with same
ListView
and dynamically make the currently opened list item bold & disabled. Or,As mentioned in the link above, use a BaseActivity, define a
DrawerLayout
there and use it in other activities. (Issue is somehow I do not tosetContentView(layout)
in BaseActivity. It does not feel right using layout in activity that is not shown anywhere)
Please suggest
Thank You