문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top