简体   繁体   English

活动销毁时如何调用简历?

[英]how to call on resume when activity is destroyed?

I have activity A which creates list view and has onResume action to update adapter. 我有一个活动A,它创建列表视图,并具有onResume操作来更新适配器。

protected void onResume() {
        super.onResume();
        ma.notifyDataSetChanged();
        Log.d("resumed","true");
        }

Also I have activity B. How can I call A's onResume , when B is destroyed or it pressed back from activity B? 我也有活动B。当B被销毁或活动B压back时,我怎么称呼A的onResume

It will called if the resumed Activity is A: 如果恢复的活动是A,它将调用:

For instance: 例如:

You are navigating from A to B: 您正在从A导航到B:

A is onPause:
B is onCreate -> onResume. you do your work on B and then finish() it
A in onResume

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM