3

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?

Community
  • 1
  • 1
Maxim Korobov
  • 2,574
  • 1
  • 26
  • 44

1 Answers1

1

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.

Stefan de Bruijn
  • 6,289
  • 2
  • 23
  • 31
  • Hm... Fragments were intrudoced in api level 11 (Android 3.0.x). I am looking for solution, which will be fully compatible with Android 2.3, and maybe earlier versions. What about Intent's flag - thanks! Seems like with combinations of some flags it's possible to reach desirable behavior. – Maxim Korobov Jan 12 '13 at 17:06
  • Android 1.6 or later can use fragments by using the compability library. it works well with slidingMenu mentioned above – Tobrun Jan 13 '13 at 00:47
  • 1
    what about I have an activity with viewpager (some fragments in the viewpager), how can i attach the activity with one item of the sliding menu? it looks impossible to transform this kind of activity to fragment as we can not use nested fragments at lest before API17. – virsir Apr 03 '13 at 15:15