android-lifecycle icon indicating copy to clipboard operation
android-lifecycle copied to clipboard

Update required for onResume() / onResumeFragments()

Open slightfoot opened this issue 9 years ago • 4 comments

You've documented a 'wierdness' with v4 compat for onResume/onPostResume. It's worth saying that onResume() should be used for normal Activity's and onResumeFragments() when using the v4 compat library. This is only required when the application is waiting for the initial FragmentTransaction's to be completed by the FragmentManager. For instance the application wants to access a Fragment that was inflated during onCreate(). The best place for this is onResumeFragments().

See: http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html#onResumeFragments%28%29

slightfoot avatar Jul 11 '14 09:07 slightfoot

Yeah, that's a good call. I was having trouble figuring out how to incorporate the differences in v4 vs. standard, but your suggestion of simply stating to use onResumeFragments() instead of onResume() for v4 is a good one.

xxv avatar Aug 18 '14 14:08 xxv

+1

jeffdav avatar Apr 26 '16 16:04 jeffdav

+1

ptran-gpfw avatar Apr 29 '16 16:04 ptran-gpfw

I think this should still be documented but it looks like they are now fixing several issues. https://youtu.be/k3IT-IJ0J98?t=14m43s (What the Fragment talk from Google I/O 2016)

slightfoot avatar May 29 '16 08:05 slightfoot