I have a simple view containing a scene root
FrameLayout
, ListView
and a couple of buttons on the bottom.
scene root
is used to load and show different scenes, the size changes dynamically depending on the current scene
. ListView
is set to match_parent
in both directions and is positioned behind scene root
.
Here's the issue:
If I start a transition using the buttons on the bottom everything works ok, no problem, magic. However, if I transition (✝) to a different scene while scrolling (✝✝) the transition seems to flicker before starting.
It almost looks like the rendering engine fails to load the first frame of the animation before the ListView
invalidates the hierarchy due to scrolling.
Thanks for the help ;)
✝ TransitionManager.go(Scene, Transition)
✝✝ I've added a couple of methods to the ListView
to allow that
All the Google apps that use Scene Transition that I've seen transit from some item in a ListView
to its detail Activity
. Since ListView
has the convenient behavior of immediately stop the scrolling when touched, such a transition doesn't produce flickering.
So it appears the best thing to do may be to programmatically stop the scrolling before transiting to the new Activity
, which is accomplished by the code here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With