Fixed
Status Update
Comments
ix...@gmail.com <ix...@gmail.com> #2
Jeremy, is this still an issue? I think the problem was that you had two transitions targeting the same View for the same action (e.g. two Slide() transitions).
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
I have a similar issue with plain AnimatorSet:
set.start()
set.pause()
set.setCurrentPlayTime(100)
set.setCurrentPlayTime(0)
set.setCurrentPlayTime(100)
set.resume()
doesn't play animation in resume().
jb...@google.com <jb...@google.com> #4
Should clarify that if I filter out setCurrentPlayTime(0)
(or replace it with setCurrentPlayTime(1)
) it works well.
Also even with setCurrentPlayTime(0)
, onAnimationEnd
is notified with correct delay (as if the animation has played).
Description
Component used: Fragment
Version used: 1.3.0-rc01
Devices/Android versions reproduced on: Samsuns S10e/Android 10, Google Pixel 4XL/Android 11
Reproducing: Attached a sample app, look at
MainActivity
/MainActivityViewModel
/FirstFragment
.Description of the issue:
I have stumbled upon a Fragment lifecycle issue where under certain conditions the
Fragment#onResume()
method does not get called. Conditions of reproducing:ChangeBounds
in my example),Activity#onCreate()
as a result of aLiveData
emission.It feels like some race condition, but is surprisingly stable at reproducing (pretty much at 100%, I only failed to reproduce it once on a fresh install) at different devices.
In the logs:
Any of the following actions fix the issue:
StateFlow
instead ofLiveData
in Activity (for initiating a Fragment transaction),Once one of these workarounds has been applied, logs are like this:
or