0

I'm working on my App about 6 Months.

I don't know if I misread it but, is it possible to create and add a Navigation Drawer when I have different Activities?

How my App works:

SplashScreen -> LogInScreen -> Activity 1(ListView) -> Activity 2 (after click on ListView item) -> ... and so on.

Is it possible to add now a Navigation Drawer? I read something that you can add a Navigation Drawer only if you don't switch between Activities is that right?

I want a Navigation that looks on every Activity different. Is it possible or it can only have one layout?

I hope my problem is clearly explained.

Kind Regards

korunos
  • 768
  • 3
  • 11
  • 31

2 Answers2

1

All your other Activities should extend The MainActivity which contains the navigationView .

helphuf links : Same Navigation Drawer in different Activities , Android: Navigation-Drawer on all activities

Community
  • 1
  • 1
johnrao07
  • 6,690
  • 4
  • 32
  • 55
1

Yes, it is possible. I suggest following option to use navigation drawer in all Activities of App.

You have a two option :

1) Use Fragment instead of Activity and put navigation drawer to First Activity. for Example : http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/

2) Create One layout for navigation-drawer and include it to all layout of your Activities using "" tag in xml Like this link : navigation drawer layout with include layout

for Example : Same Navigation Drawer in different Activities

Community
  • 1
  • 1
Mayur Sakhiya
  • 326
  • 2
  • 14
  • I want to add DIFFERENT layouts on every Activity. But thank you – korunos Nov 26 '15 at 11:49
  • yes u can use different layouts and add navigation drawer layout in all layouts using tag in xml Like this link : http://stackoverflow.com/questions/24613154/navigation-drawer-layout-with-include-layout – Mayur Sakhiya Nov 26 '15 at 12:18