Activity started with startActivityForResult() not returning to calling Activity

前端 未结 3 1053
悲哀的现实
悲哀的现实 2021-01-17 21:22

I have 3 Activities - A, B, and C.

In a nutshell, Activity A starts Activity B, then A also starts Activity C and

3条回答
  •  不思量自难忘°
    2021-01-17 22:00

    You might give this a try:

    if (getParent() == null) {
    setResult(RESULT_OK, dataTobePassback);
    } else {
    getParent().setResult(RESULT_OK, dataTobePassback);
    }
    

    dataTobePassback is an Intent that carries the stuff you may need to pass back to the calling activity

提交回复
热议问题