在按下后退按钮(重新创建活动)之前调用并旋转设备后是否Activity
保留结果?Activity.setResult(int)
似乎Activity
没有恢复这种信息。如果是这种情况,我应该使用 a 恢复结果并再次Bundle
调用吗?setResult
在按下后退按钮(重新创建活动)之前调用并旋转设备后是否Activity
保留结果?Activity.setResult(int)
似乎Activity
没有恢复这种信息。如果是这种情况,我应该使用 a 恢复结果并再次Bundle
调用吗?setResult
In a word, yes. The result isn't returned until you call finish(). setResult() presumes that the Activity setting the result (call it Activity B) was started by a call to startActivityForResult() from another Activity (call it Activity A). The presumption is that Activity B will finish, resulting in an automatic return to Activity B.