mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Transform closing window to icon on workspace using adaptive icons.
With adaptive icons, we can have FloatingIconView match the shape and size of the closing window, regardless of the icon shape. FloatingIconView starts off as a rounded rect (same corners as task view) and then morphs into the icon shape using FolderShape#createRevealAnimator in reverse. Decided to add FeatureFlag.ADAPTIVE_ICON_WINDOW_ANIM since there are still some issues with folders, badges, and a visible jump when swapping the FloatingIconView with the original icon. Bug: 123900446 Change-Id: I94969eea6d5f4b932a84a11eb403611276042b46
This commit is contained in:
@@ -403,9 +403,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
private void playIconAnimators(AnimatorSet appOpenAnimator, View v, Rect windowTargetBounds,
|
||||
boolean toggleVisibility) {
|
||||
final boolean isBubbleTextView = v instanceof BubbleTextView;
|
||||
if (mFloatingView == null) {
|
||||
mFloatingView = new FloatingIconView(mLauncher);
|
||||
} else {
|
||||
if (mFloatingView != null) {
|
||||
mFloatingView.setTranslationX(0);
|
||||
mFloatingView.setTranslationY(0);
|
||||
mFloatingView.setScaleX(1);
|
||||
@@ -414,7 +412,8 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
mFloatingView.setBackground(null);
|
||||
}
|
||||
Rect rect = new Rect();
|
||||
mFloatingView.matchPositionOf(mLauncher, v, toggleVisibility, rect);
|
||||
mFloatingView = FloatingIconView.getFloatingIconView(mLauncher, v, toggleVisibility,
|
||||
true /* useDrawableAsIs */, -1 /* aspectRatio */, rect, mFloatingView);
|
||||
|
||||
int viewLocationStart = mIsRtl ? windowTargetBounds.width() - rect.right : rect.left;
|
||||
LayoutParams lp = (LayoutParams) mFloatingView.getLayoutParams();
|
||||
|
||||
Reference in New Issue
Block a user