i want to end a previous activity after the transition between 2 activities is completed
i have tried ActivityCompat.finishAfterTransition(this);
but it actually finishes the activity before the transition is done
i have looked into this solution before but i couldn't understand the answer to it , it would be swell if someone can explain how to end an activity after the transition is done
Updates :
i just tried starting the next activity like this
Intent intent = new Intent(LoginActivity.this, TaskActivity.class);
startActivity(intent);
the onStop code will be activated but when i use this
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(LoginActivity.this);
Intent intent = new Intent(LoginActivity.this, TaskActivity.class);
startActivity(intent,options.toBundle());
the onStop wouldn't be activated so should i manually activate it and if so is it recommended