Solution 1 :
to initiate the back operation you can call
super.onBackPressed();
from your activity.
Problem :
Suppose I move to another activity from my current one and then I need to go back to previous activity by pressing the back button originally present in the phone along with a home button and menu button. I have disabled my Action Bar and I don’t want to enable it. Nor I want to create an icon in my activity that represents back.
Please Help!
Comments
Comment posted by Code Demon
so you want that when the user clicks the back button,nothing happens is that the case?
Comment posted by Code Demon
or do you want to simply remove the back button on your action bar?
Comment posted by Raghav Ambashta
I have already removed the action bar. I just want that when the user presses the back button of his phone then he should go back to the previous activity. That is, the user should switch back to the previous activity on pressing the phone’s back button.