How to use the same Drawer Navigation menu on multiple Activitys without repeating code?

Asked

Viewed 57 times

-1

How to use the same menu Drawer Navigation in several activitys without repeating code?

  • Use the container as a FrameLayout

  • take a look at this code: https://gist.github.com/anandbose/7d6efb35c900eaba3b26

2 answers

1

It is possible to use only one Activity, and inject fragments in the container, so it would be only with a menu (however I do not recommend, but it is at your discretion)

0

Put all your Drawer initialize code inside an Activity(Drawernavigatableactivity extends Activity) and do all your activities that need this behavior to inherit from it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.