Loading quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +14 −3 Original line number Diff line number Diff line Loading @@ -204,7 +204,15 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag mLauncher.getStateManager().setCurrentAnimation(anim); Rect windowTargetBounds = getWindowTargetBounds(targetCompats); playIconAnimators(anim, v, windowTargetBounds); boolean isAllOpeningTargetTrs = true; for (int i = 0; i < targetCompats.length; i++) { RemoteAnimationTargetCompat target = targetCompats[i]; if (target.mode == MODE_OPENING) { isAllOpeningTargetTrs &= target.isTranslucent; } if (!isAllOpeningTargetTrs) break; } playIconAnimators(anim, v, windowTargetBounds, !isAllOpeningTargetTrs); if (launcherClosing) { Pair<AnimatorSet, Runnable> launcherContentAnimator = getLauncherContentAnimator(true /* isAppOpening */); Loading Loading @@ -432,7 +440,8 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag /** * Animators for the "floating view" of the view used to launch the target. */ private void playIconAnimators(AnimatorSet appOpenAnimator, View v, Rect windowTargetBounds) { private void playIconAnimators(AnimatorSet appOpenAnimator, View v, Rect windowTargetBounds, boolean toggleVisibility) { final boolean isBubbleTextView = v instanceof BubbleTextView; mFloatingView = new View(mLauncher); if (isBubbleTextView && v.getTag() instanceof ItemInfoWithIcon ) { Loading Loading @@ -485,7 +494,9 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag // Swap the two views in place. ((ViewGroup) mDragLayer.getParent()).addView(mFloatingView); if (toggleVisibility) { v.setVisibility(View.INVISIBLE); } int[] dragLayerBounds = new int[2]; mDragLayer.getLocationOnScreen(dragLayerBounds); Loading src/com/android/launcher3/BubbleTextView.java +8 −0 Original line number Diff line number Diff line Loading @@ -341,6 +341,14 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, refreshDrawableState(); } @Override public void onVisibilityAggregated(boolean isVisible) { super.onVisibilityAggregated(isVisible); if (mIcon != null) { mIcon.setVisible(getWindowVisibility() == VISIBLE && isShown(), false); } } @Override public void onLauncherResume() { // Reset the pressed state of icon that was locked in the press state while activity Loading src/com/android/launcher3/FastBitmapDrawable.java +10 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.launcher3; import static com.android.launcher3.anim.Interpolators.ACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import android.animation.ObjectAnimator; import android.graphics.Bitmap; Loading Loading @@ -220,10 +221,17 @@ public class FastBitmapDrawable extends Drawable { mScaleAnimation.setDuration(CLICK_FEEDBACK_DURATION); mScaleAnimation.setInterpolator(ACCEL); mScaleAnimation.start(); } else { if (isVisible()) { mScaleAnimation = ObjectAnimator.ofFloat(this, SCALE, 1f); mScaleAnimation.setDuration(CLICK_FEEDBACK_DURATION); mScaleAnimation.setInterpolator(DEACCEL); mScaleAnimation.start(); } else { mScale = 1f; invalidateSelf(); } } return true; } return false; Loading Loading
quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +14 −3 Original line number Diff line number Diff line Loading @@ -204,7 +204,15 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag mLauncher.getStateManager().setCurrentAnimation(anim); Rect windowTargetBounds = getWindowTargetBounds(targetCompats); playIconAnimators(anim, v, windowTargetBounds); boolean isAllOpeningTargetTrs = true; for (int i = 0; i < targetCompats.length; i++) { RemoteAnimationTargetCompat target = targetCompats[i]; if (target.mode == MODE_OPENING) { isAllOpeningTargetTrs &= target.isTranslucent; } if (!isAllOpeningTargetTrs) break; } playIconAnimators(anim, v, windowTargetBounds, !isAllOpeningTargetTrs); if (launcherClosing) { Pair<AnimatorSet, Runnable> launcherContentAnimator = getLauncherContentAnimator(true /* isAppOpening */); Loading Loading @@ -432,7 +440,8 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag /** * Animators for the "floating view" of the view used to launch the target. */ private void playIconAnimators(AnimatorSet appOpenAnimator, View v, Rect windowTargetBounds) { private void playIconAnimators(AnimatorSet appOpenAnimator, View v, Rect windowTargetBounds, boolean toggleVisibility) { final boolean isBubbleTextView = v instanceof BubbleTextView; mFloatingView = new View(mLauncher); if (isBubbleTextView && v.getTag() instanceof ItemInfoWithIcon ) { Loading Loading @@ -485,7 +494,9 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag // Swap the two views in place. ((ViewGroup) mDragLayer.getParent()).addView(mFloatingView); if (toggleVisibility) { v.setVisibility(View.INVISIBLE); } int[] dragLayerBounds = new int[2]; mDragLayer.getLocationOnScreen(dragLayerBounds); Loading
src/com/android/launcher3/BubbleTextView.java +8 −0 Original line number Diff line number Diff line Loading @@ -341,6 +341,14 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, refreshDrawableState(); } @Override public void onVisibilityAggregated(boolean isVisible) { super.onVisibilityAggregated(isVisible); if (mIcon != null) { mIcon.setVisible(getWindowVisibility() == VISIBLE && isShown(), false); } } @Override public void onLauncherResume() { // Reset the pressed state of icon that was locked in the press state while activity Loading
src/com/android/launcher3/FastBitmapDrawable.java +10 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.launcher3; import static com.android.launcher3.anim.Interpolators.ACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import android.animation.ObjectAnimator; import android.graphics.Bitmap; Loading Loading @@ -220,10 +221,17 @@ public class FastBitmapDrawable extends Drawable { mScaleAnimation.setDuration(CLICK_FEEDBACK_DURATION); mScaleAnimation.setInterpolator(ACCEL); mScaleAnimation.start(); } else { if (isVisible()) { mScaleAnimation = ObjectAnimator.ofFloat(this, SCALE, 1f); mScaleAnimation.setDuration(CLICK_FEEDBACK_DURATION); mScaleAnimation.setInterpolator(DEACCEL); mScaleAnimation.start(); } else { mScale = 1f; invalidateSelf(); } } return true; } return false; Loading