Loading quickstep/src/com/android/quickstep/TaskViewUtils.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,8 @@ import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X; import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.QuickstepTransitionManager.ANIMATION_DELAY_NAV_FADE_IN; import static com.android.launcher3.QuickstepTransitionManager.ANIMATION_DELAY_NAV_FADE_IN; Loading Loading @@ -330,6 +332,17 @@ public final class TaskViewUtils { Matrix localMti = new Matrix(); Matrix localMti = new Matrix(); localMt.invert(localMti); localMt.invert(localMti); mti[i] = localMti; mti[i] = localMti; // Translations for child thumbnails also get scaled as the parent taskView scales // Add inverse scaling to keep translations the same float translationY = ttv.getTranslationY(); float translationX = ttv.getTranslationX(); float fullScreenScale = topMostSimulators[i].getTaskViewSimulator().getFullScreenScale(); out.addFloat(ttv, VIEW_TRANSLATE_Y, translationY, translationY / fullScreenScale, TOUCH_RESPONSE_INTERPOLATOR); out.addFloat(ttv, VIEW_TRANSLATE_X, translationX, translationX / fullScreenScale, TOUCH_RESPONSE_INTERPOLATOR); } } Matrix[] k0i = new Matrix[matrixSize]; Matrix[] k0i = new Matrix[matrixSize]; Loading src/com/android/launcher3/Utilities.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -723,4 +723,14 @@ public final class Utilities { } } return options; return options; } } /** Logs the Scale and Translate properties of a matrix. Ignores skew and perspective. */ public static void logMatrix(String label, Matrix matrix) { float[] matrixValues = new float[9]; matrix.getValues(matrixValues); Log.d(label, String.format("%s: %s\nscale (x,y) = (%f, %f)\ntranslate (x,y) = (%f, %f)", label, matrix, matrixValues[Matrix.MSCALE_X], matrixValues[Matrix.MSCALE_Y], matrixValues[Matrix.MTRANS_X], matrixValues[Matrix.MTRANS_Y] )); } } } Loading
quickstep/src/com/android/quickstep/TaskViewUtils.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,8 @@ import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X; import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.QuickstepTransitionManager.ANIMATION_DELAY_NAV_FADE_IN; import static com.android.launcher3.QuickstepTransitionManager.ANIMATION_DELAY_NAV_FADE_IN; Loading Loading @@ -330,6 +332,17 @@ public final class TaskViewUtils { Matrix localMti = new Matrix(); Matrix localMti = new Matrix(); localMt.invert(localMti); localMt.invert(localMti); mti[i] = localMti; mti[i] = localMti; // Translations for child thumbnails also get scaled as the parent taskView scales // Add inverse scaling to keep translations the same float translationY = ttv.getTranslationY(); float translationX = ttv.getTranslationX(); float fullScreenScale = topMostSimulators[i].getTaskViewSimulator().getFullScreenScale(); out.addFloat(ttv, VIEW_TRANSLATE_Y, translationY, translationY / fullScreenScale, TOUCH_RESPONSE_INTERPOLATOR); out.addFloat(ttv, VIEW_TRANSLATE_X, translationX, translationX / fullScreenScale, TOUCH_RESPONSE_INTERPOLATOR); } } Matrix[] k0i = new Matrix[matrixSize]; Matrix[] k0i = new Matrix[matrixSize]; Loading
src/com/android/launcher3/Utilities.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -723,4 +723,14 @@ public final class Utilities { } } return options; return options; } } /** Logs the Scale and Translate properties of a matrix. Ignores skew and perspective. */ public static void logMatrix(String label, Matrix matrix) { float[] matrixValues = new float[9]; matrix.getValues(matrixValues); Log.d(label, String.format("%s: %s\nscale (x,y) = (%f, %f)\ntranslate (x,y) = (%f, %f)", label, matrix, matrixValues[Matrix.MSCALE_X], matrixValues[Matrix.MSCALE_Y], matrixValues[Matrix.MTRANS_X], matrixValues[Matrix.MTRANS_Y] )); } } }