Loading core/java/android/app/ActivityTransitionCoordinator.java +16 −12 Original line number Diff line number Diff line Loading @@ -570,8 +570,10 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { // Find the location in the view's parent ViewGroup parent = (ViewGroup) view.getParent(); Matrix matrix = new Matrix(); if (parent != null) { parent.transformMatrixToLocal(matrix); matrix.postTranslate(parent.getScrollX(), parent.getScrollY()); } mSharedElementParentMatrices.add(matrix); } } Loading Loading @@ -861,6 +863,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { Matrix tempMatrix = new Matrix(); for (int i = 0; i < numSharedElements; i++) { View view = mSharedElements.get(i); if (view.isAttachedToWindow()) { tempMatrix.reset(); mSharedElementParentMatrices.get(i).invert(tempMatrix); GhostView.addGhost(view, decor, tempMatrix); Loading @@ -874,6 +877,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { } } } } protected boolean moveSharedElementWithParent() { return true; Loading Loading @@ -1065,7 +1069,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { @Override public boolean onPreDraw() { GhostView ghostView = GhostView.getGhost(mView); if (ghostView == null) { if (ghostView == null || !mView.isAttachedToWindow()) { removeListener(); } else { GhostView.calculateMatrix(mView, mDecor, mMatrix); Loading Loading
core/java/android/app/ActivityTransitionCoordinator.java +16 −12 Original line number Diff line number Diff line Loading @@ -570,8 +570,10 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { // Find the location in the view's parent ViewGroup parent = (ViewGroup) view.getParent(); Matrix matrix = new Matrix(); if (parent != null) { parent.transformMatrixToLocal(matrix); matrix.postTranslate(parent.getScrollX(), parent.getScrollY()); } mSharedElementParentMatrices.add(matrix); } } Loading Loading @@ -861,6 +863,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { Matrix tempMatrix = new Matrix(); for (int i = 0; i < numSharedElements; i++) { View view = mSharedElements.get(i); if (view.isAttachedToWindow()) { tempMatrix.reset(); mSharedElementParentMatrices.get(i).invert(tempMatrix); GhostView.addGhost(view, decor, tempMatrix); Loading @@ -874,6 +877,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { } } } } protected boolean moveSharedElementWithParent() { return true; Loading Loading @@ -1065,7 +1069,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { @Override public boolean onPreDraw() { GhostView ghostView = GhostView.getGhost(mView); if (ghostView == null) { if (ghostView == null || !mView.isAttachedToWindow()) { removeListener(); } else { GhostView.calculateMatrix(mView, mDecor, mMatrix); Loading