简体   繁体   中英

how to call on resume when activity is destroyed?

I have activity A which creates list view and has onResume action to update adapter.

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?

It will called if the resumed Activity is A:

For instance:

You are navigating from A to B:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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