Issue
I cant seem to find this answer using search engine but in the case of an activity hosting a fragment, when the activities onPostResume method is called, i am assuming that any attached fragments onResume methods will already have been called. who can confirm ?
Solution
Native Activity
final void performResume() {
...
mInstrumentation.callActivityOnResume(this);
...
mFragments.dispatchResume();
mFragments.execPendingActions();
onPostResume();
...
}
Support FragmentActivity
protected void onPostResume() {
super.onPostResume();
...
onResumeFragments();
mFragments.execPendingActions();
}
protected void onResumeFragments() {
mFragments.dispatchResume();
}
So here it depends on whether you do stuff with fragments before or after calling super.onPostResume()
in your @Override
.
Answered By - TWiStErRob
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.