问题描述
我使用的ActivityGroup。我用下面的code从的ActivityGroup以取代视图,并推出了新的活动。
I am using ActivityGroup. I use the following code from ActivityGroup in order to replace view and launch a new activity.
Intent i = new Intent(SummaryCostScreen.this,PermissionsScreen.class);
replaceContentView("activity1",i);
public void replaceContentView(String id, Intent newIntent) {
View view = getLocalActivityManager().startActivity(id,
newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
}
上述code的问题是,我需要有 startActivityForResult 代替 startActivity 后,因为我需要更新发射活动时的UI从启动的活动回来了。
The problem with the above code is that, I need to have startActivityForResult in place of startActivity, since I need to update the UI of launcher activity when coming back from the launched activity.
getLocalActivityManager()没有startActivityForResult。我应该如何解决这个问题,这样,我能够从更新的onActivityResult UI?
getLocalActivityManager() does not have startActivityForResult. How should I address this situation, such that, I am able to update UI from onActivityResult?
任何帮助很多AP preciated。
Any help is much appreciated.
PS :我无法更改启动新画面中的replaceContentView的做法,因为这已经在许多其他地方被使用,这是我需要调用startActivityForResult
PS: I cannot change the replaceContentView approach for launching new screen, since that has been used at numerous other places and this is the only scenario in which I need to call startActivityForResult
推荐答案
转换批示答案,
尝试使用 onResume()
更新 SummerCostScreen
这篇关于来自的ActivityGroup startActivityForResult的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!