Reputation: 461
You may find this question before.But I need to restart the previous activity when the button in the present activity is clicked.But I need to maintain in the present activity and the back button should launch activity based on the click of the button in the present activity.
Upvotes: 0
Views: 351
Reputation: 24031
As you have not mentioned about the back activity whether it is fixed or not. I am assuming it is not fixed. You can try something like this:
Upvotes: 1
Reputation: 876
You can put everything that's on the onCreate on the onResume. check the activity lifecycle (google it) to see why this will work.
Upvotes: 1