I recently ran into some strange problem. I have two activities. The first contains a grid with thumbnails. This is a kind of gallery. And the second contains a presentation pager with fragments and behaves as a means of viewing images, where you can move between images. I am using a shared element transition to trigger the second action. Just like the Google Photos app. In the second action, I can scroll up or down to reject the action with the background fading out. I made my second activity completely transparent:
<item name="android:windowBackground">@color/palette_transparent</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowAnimationStyle">@android:style/Animation</item>
But the problem is that when I scroll the image up / down, and the second activity background disappears, I see a white background, but not the first type of activity. If I start the second action without going over a common element, everything will be fine.
I did a study and found out that this white layer probably overlaps the first action. It is not part of the second action, as I can see in the hierarchy of representations of Stetho.
My explanation is probably not very good either in my English, so a few videos here clarify my problem too much.
Video Without transition and Video With transition
source share