Suppose you user went to A->B->C->D activities and now user wanted to again come to activity A(HomeActivity)from D activity. Use the following code.
Intent intent = new Intent(this, HomeActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
No comments:
Post a Comment