1

I am trying to work with android Sidebar first time. I have successfully implemented sidebar on my Main Activity but I want sidebar in my all other activities. Is there any solution for it?? or Do I need to use Fragment??

Thanks

Ronak Vala
  • 23
  • 7
  • Maybe this will give you an idea (https://github.com/walkingice/gui-sliding-sidebar) (https://github.com/korovyansk/android-fb-like-slideout-navigation) – Muhamet Aljobairi Jun 15 '14 at 06:39

2 Answers2

0

you can select navigation type other than blank like Navigation Drawer then makes own custom fragments for each options of navigation Drawer.

0

I am assuming by Sidebar you mean DrawerLayout.

When using this type of navigation, it is a better practice to have Fragment-based flow rather than Activity-based. Implementing DrawerLayout in multiple activities will cause a lot of redundant code.

The solution is to use Fragments. Maintain an instance of a FragmentTransaction throughout the lifecycle of your app. Decide the layout which you want to change when the user clicks on navigation elements and add/replace Fragments in this layout according to your app's flow.

rhoadster91
  • 354
  • 2
  • 12