I am developing an Android app that uses slidingMenu
I want it set up so that when a user taps on an item of sliding menu, it goes to activity 1. Then when using the menu again, it moves to activity 2.
But, when I press the back button, it shows the menu pane. I want the user to move from the second activity to the first activity; instead of showing menu. Can anyone help me please?
Edit Menu has 6 items each going to a different activity and I don't know the previous activity for using intent.
Try overriding the onBackPressed() method in the second activity:
About the FLAG_ACTIVITY_CLEAR_TOP (from http://developer.android.com):