Loading core/java/android/app/ActivityTransitionCoordinator.java +11 −1 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { protected static final String KEY_SNAPSHOT = "shared_element:bitmap"; protected static final String KEY_SCALE_TYPE = "shared_element:scaleType"; protected static final String KEY_IMAGE_MATRIX = "shared_element:imageMatrix"; protected static final String KEY_ELEVATION = "shared_element:elevation"; protected static final ImageView.ScaleType[] SCALE_TYPE_VALUES = ImageView.ScaleType.values(); Loading Loading @@ -393,6 +394,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { float z = sharedElementBundle.getFloat(KEY_TRANSLATION_Z); view.setTranslationZ(z); float elevation = sharedElementBundle.getFloat(KEY_ELEVATION); view.setElevation(elevation); float left = sharedElementBundle.getFloat(KEY_SCREEN_LEFT); float top = sharedElementBundle.getFloat(KEY_SCREEN_TOP); Loading Loading @@ -499,6 +502,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { state.mBottom = view.getBottom(); state.mMeasuredWidth = view.getMeasuredWidth(); state.mMeasuredHeight = view.getMeasuredHeight(); state.mTranslationZ = view.getTranslationZ(); state.mElevation = view.getElevation(); if (!(view instanceof ImageView)) { return state; } Loading Loading @@ -557,6 +562,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { imageView.setImageMatrix(state.mMatrix); } } view.setElevation(state.mElevation); view.setTranslationZ(state.mTranslationZ); int widthSpec = View.MeasureSpec.makeMeasureSpec(state.mMeasuredWidth, View.MeasureSpec.EXACTLY); int heightSpec = View.MeasureSpec.makeMeasureSpec(state.mMeasuredHeight, Loading Loading @@ -622,6 +629,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { sharedElementBundle.putFloat(KEY_SCREEN_TOP, tempBounds.top); sharedElementBundle.putFloat(KEY_SCREEN_BOTTOM, tempBounds.bottom); sharedElementBundle.putFloat(KEY_TRANSLATION_Z, view.getTranslationZ()); sharedElementBundle.putFloat(KEY_ELEVATION, view.getElevation()); Parcelable bitmap = mListener.captureSharedElementSnapshot(view, tempMatrix, tempBounds); if (bitmap != null) { Loading Loading @@ -801,5 +809,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { int mMeasuredHeight; ImageView.ScaleType mScaleType; Matrix mMatrix; float mTranslationZ; float mElevation; } } Loading
core/java/android/app/ActivityTransitionCoordinator.java +11 −1 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { protected static final String KEY_SNAPSHOT = "shared_element:bitmap"; protected static final String KEY_SCALE_TYPE = "shared_element:scaleType"; protected static final String KEY_IMAGE_MATRIX = "shared_element:imageMatrix"; protected static final String KEY_ELEVATION = "shared_element:elevation"; protected static final ImageView.ScaleType[] SCALE_TYPE_VALUES = ImageView.ScaleType.values(); Loading Loading @@ -393,6 +394,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { float z = sharedElementBundle.getFloat(KEY_TRANSLATION_Z); view.setTranslationZ(z); float elevation = sharedElementBundle.getFloat(KEY_ELEVATION); view.setElevation(elevation); float left = sharedElementBundle.getFloat(KEY_SCREEN_LEFT); float top = sharedElementBundle.getFloat(KEY_SCREEN_TOP); Loading Loading @@ -499,6 +502,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { state.mBottom = view.getBottom(); state.mMeasuredWidth = view.getMeasuredWidth(); state.mMeasuredHeight = view.getMeasuredHeight(); state.mTranslationZ = view.getTranslationZ(); state.mElevation = view.getElevation(); if (!(view instanceof ImageView)) { return state; } Loading Loading @@ -557,6 +562,8 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { imageView.setImageMatrix(state.mMatrix); } } view.setElevation(state.mElevation); view.setTranslationZ(state.mTranslationZ); int widthSpec = View.MeasureSpec.makeMeasureSpec(state.mMeasuredWidth, View.MeasureSpec.EXACTLY); int heightSpec = View.MeasureSpec.makeMeasureSpec(state.mMeasuredHeight, Loading Loading @@ -622,6 +629,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { sharedElementBundle.putFloat(KEY_SCREEN_TOP, tempBounds.top); sharedElementBundle.putFloat(KEY_SCREEN_BOTTOM, tempBounds.bottom); sharedElementBundle.putFloat(KEY_TRANSLATION_Z, view.getTranslationZ()); sharedElementBundle.putFloat(KEY_ELEVATION, view.getElevation()); Parcelable bitmap = mListener.captureSharedElementSnapshot(view, tempMatrix, tempBounds); if (bitmap != null) { Loading Loading @@ -801,5 +809,7 @@ abstract class ActivityTransitionCoordinator extends ResultReceiver { int mMeasuredHeight; ImageView.ScaleType mScaleType; Matrix mMatrix; float mTranslationZ; float mElevation; } }