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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top