Ensure Gesture Nav Edu animation scales to fit different screen sizes am: 7146fc249f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24642559 Change-Id: I2de39364096864d4d92c8a2a187da4ad5abe1a1b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -226,13 +226,11 @@ abstract class TutorialController implements BackGestureAttemptCallback,
|
||||
return;
|
||||
}
|
||||
Matrix scaleMatrix = new Matrix();
|
||||
float pivotX = mScreenWidth / 2f;
|
||||
float pivotY = mScreenHeight;
|
||||
float scaleFactor = mScreenWidth / animationBoundsRect.width();
|
||||
float heightTranslate = (mScreenHeight - (scaleFactor * animationBoundsRect.height()));
|
||||
|
||||
scaleMatrix.postScale(scaleFactor, scaleFactor, pivotX, pivotY);
|
||||
scaleMatrix.postTranslate(0,
|
||||
mTutorialFragment.getDeviceProfile().heightPx - animationBoundsRect.height());
|
||||
scaleMatrix.postScale(scaleFactor, scaleFactor);
|
||||
scaleMatrix.postTranslate(0, heightTranslate);
|
||||
mAnimatedGestureDemonstration.setImageMatrix(scaleMatrix);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user