[英]How to make an animation play on activity start with intent, and when finished with finish()
[英]How to make rest of methods start after new intent activity is finished
我從一個 function 調用新活動,如下所示。
我想讓 loadRoundFromExercise() ~ updateRound() 方法在從 openRegisterPopupActivity() 調用的新活動完成后啟動
我想到了 sleep 方法。 但我無法估計用戶要輸入文本多長時間。
那么..我該如何解決這個問題? 請幫助我。
謝謝。
adapter.setRoutineListener(new HealthRoutineViewHolder.Listener() {
@Override
public void onAddItem(ExerciseLog exerciseLog) {
setupLogReference(exerciseLog);
openRegisterPopupActivity(); // I call new activity here by intent.
loadRoundFromExercise();
convertToRoundLog();
updateRound();
}
您可以使用startActivityForResult()
和onActivityResult()
回調。 這些基本上讓 Activity A 啟動 Activity B,然后將結果返回給 Activity A。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.