-2

I am planning to start an app from the scratch and I need to know wheather a COMMON Navigation drawer is applied through out multiple activities without using a fragment inside the activity.

     I tried many examples but none worked for me. Any help should be greatly appreciated.
Raghul Sugathan
  • 350
  • 1
  • 7
  • 22
  • If all the examples that are out there of this exact thing don't work for you, one more example probably isn't going to help you. Instead, post what you've tried, and describe the problems you're having. – Mike M. May 13 '16 at 08:27

3 Answers3

1

Yes it is possible create one base activity and implement the drawer in base activity like here. and extends that base activity

Community
  • 1
  • 1
Manthan Patel
  • 993
  • 1
  • 9
  • 20
0

As far as I know it is not possible. I've personnaly used a single activity hosting a navigation drawer instantiating differents fragments to swipe between them. Here if you wanna do it: http://developer.android.com/training/implementing-navigation/nav-drawer.html

The best you could have to get kind of the same result with activities is playing with transitions params in each of their class. It is kinda heavy. Use fragments for this purpose.

The following topic could bring you some work elements if you still wanna do it: Android how to add swipe Gesture on LinearLayout without onDown true

But keep in mind that it won't be as smooth as the navigation drawer with fragments.

Community
  • 1
  • 1
Amesys
  • 816
  • 2
  • 10
  • 19
0

As far it's not possible without using fragment. and why you don't want use fragment.? Fragment is a best thing to achieve this. Here i am attached some links. I hope that links are use full for you.

https://www.learn2crack.com/2014/05/android-working-with-fragments.html http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/