Skip to content

Commit 86f2810

Browse files
committed
fix(android): fixed transition when start element is fully clipped
1 parent fd1a772 commit 86f2810

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementTransition.java

+5
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,13 @@ private void updateLayout() {
179179
RNSharedElementStyle startStyle = startItem.getStyle();
180180
RNSharedElementStyle endStyle = endItem.getStyle();
181181
if ((startStyle == null) && (endStyle == null)) return;
182+
183+
// Get content
182184
RNSharedElementContent startContent = startItem.getContent();
183185
RNSharedElementContent endContent = endItem.getContent();
186+
if ((mAnimation == RNSharedElementAnimation.MOVE) && (startContent == null) && (endContent != null)) {
187+
startContent = endContent;
188+
}
184189

185190
// Get layout
186191
Rect startLayout = (startStyle != null) ? startStyle.layout : EMPTY_RECT;

0 commit comments

Comments
 (0)