Issue
I call new activity from one function like below.
I want to make loadRoundFromExercise() ~ updateRound() methods starts after new activity called from openRegisterPopupActivity() is finished
I thought to put sleep method. but I can't estimate how long user are going to put text.
So.. how can I fix this? plz help me.
Thank you.
adapter.setRoutineListener(new HealthRoutineViewHolder.Listener() {
@Override
public void onAddItem(ExerciseLog exerciseLog) {
setupLogReference(exerciseLog);
openRegisterPopupActivity(); // I call new activity here by intent.
loadRoundFromExercise();
convertToRoundLog();
updateRound();
}
Solution
You could use startActivityForResult()
and the onActivityResult()
callback. These basically let Activity A start Activity B and then return a result back to Activity A.
Answered By - Gavin Wright
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.