Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sliding menu with many activities

There are many implementations of facebook app-like sliding menu, which are mentioned in that question.

Some of them, which implementation I checked, are using one activity for showing menu and data. When user selects item from menu no new activity is start. Thus, one activity is using for many part of the program, showing different data in one view.

IMHO, it could be messy to use one activity for all. So, I'm thinking of new plan:

  • Add menu to all activities;
  • When user select item in menu, close(pop/hide) current activity and start (push/show) activity, which is related to selected item.

Any ideas to implement such behavior?

like image 500
Maxim Korobov Avatar asked Dec 08 '25 06:12

Maxim Korobov


1 Answers

I'm way to lazy to read through all those answers in the mentioned thread and check all provided libraries.

A good sliding menu library which works properly with Fragments is SlidingMenu

Also you should take a look at the documentation on Activities, Intents (the flags you can set to them) and how their life cycles are managed cause you seem to mix up some things.

like image 52
Stefan de Bruijn Avatar answered Dec 09 '25 21:12

Stefan de Bruijn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!