Fixed
Status Update
Comments
am...@google.com <am...@google.com>
am...@google.com <am...@google.com> #2
I can confirm this on Android 4.4.4 with Cyanogen Oneplus.
gg...@google.com <gg...@google.com> #3
Still present in Android Lollipop 5.0.1 on Nexus 5 and Nexus 6. Is anyone at Google actually reading the bug reports? This one is quite old and should be very easy to fix...
Description
I found an incorrect behaviour in Visibility Transition (android.transition.Visibility).
Sample project:
Steps (100% reproducible):
1) Open FrameworkTransitionsActivity
2) Tap on "Scene 2" radiobutton
3) Image disappeared with fade animation.
4) Tap on "Scene 1" radiobutton
Actual result:
Nothing happened. There is no image.
Expected result:
Image appears with fade animation.
What is happening is the image is removed from the parent for the first scene change, but it should stay in the container of scene 1. Otherwise we are getting back to the scene 1 and there is no image.
Where is the issue:
Method onDisappear. Line 403:
Here we are using startView as overlayView.
It means startView will be added to sceneRoot's overlay. It means startView would be removed from the current parent. So its not safe to use startView when it still has a parent. In such case we need to use TransitionUtils.copyViewImage instead.
I have my Transitions backport library Transitions-Everywhere. That is how I fixed it in my library: