I am using two activities first activity contain some edit texts and the second layout is displayed when the submit button is clicked.
So that the first activity is in pause state and when I press the back button from the second layout the first layout is resumed (That is the previous state is recovered).
Now I need the back button action in my own back button in the screen.
I tried with onFinish() in the button click but the previous state is not resumed.
I tried with startActivityForResult too.
Any other solution for this?
Please share your ideas.
Thanks in advance.
Call the
finish()method of your Activity. That will close your second Activity and resume your previous Activity.