Loading src/com/android/launcher3/notification/NotificationFooterLayout.java +4 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,10 @@ public class NotificationFooterLayout extends FrameLayout { @Override public void onAnimationEnd(Animator animation) { ((ViewGroup) getParent()).findViewById(R.id.divider).setVisibility(GONE); ((ViewGroup) getParent()).removeView(NotificationFooterLayout.this); // Keep view around because gutter is aligned to it, but remove height to // both hide the view and keep calculations correct for last dismissal. getLayoutParams().height = 0; requestLayout(); } }); collapseFooter.start(); Loading src/com/android/launcher3/notification/NotificationItemView.java +18 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.launcher3.notification; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.app.Notification; import android.content.Context; import android.graphics.Rect; Loading @@ -28,7 +30,9 @@ import android.widget.FrameLayout; import android.widget.TextView; import com.android.launcher3.ItemInfo; import com.android.launcher3.LauncherAnimUtils; import com.android.launcher3.R; import com.android.launcher3.anim.PropertyResetListener; import com.android.launcher3.anim.RoundedRectRevealOutlineProvider; import com.android.launcher3.graphics.IconPalette; import com.android.launcher3.logging.UserEventDispatcher.LogContainerProvider; Loading Loading @@ -89,6 +93,8 @@ public class NotificationItemView extends PopupItemView implements LogContainerP } public Animator animateHeightRemoval(int heightToRemove, boolean shouldRemoveFromTop) { AnimatorSet anim = LauncherAnimUtils.createAnimatorSet(); Rect startRect = new Rect(mPillRect); Rect endRect = new Rect(mPillRect); if (shouldRemoveFromTop) { Loading @@ -96,8 +102,18 @@ public class NotificationItemView extends PopupItemView implements LogContainerP } else { endRect.bottom -= heightToRemove; } return new RoundedRectRevealOutlineProvider(getBackgroundRadius(), getBackgroundRadius(), startRect, endRect, mRoundedCorners).createRevealAnimator(this, false); anim.play(new RoundedRectRevealOutlineProvider(getBackgroundRadius(), getBackgroundRadius(), startRect, endRect, mRoundedCorners).createRevealAnimator(this, false)); View bottomGutter = findViewById(R.id.gutter_bottom); if (bottomGutter != null && bottomGutter.getVisibility() == VISIBLE) { Animator translateGutter = ObjectAnimator.ofFloat(bottomGutter, TRANSLATION_Y, -heightToRemove); translateGutter.addListener(new PropertyResetListener<>(TRANSLATION_Y, 0f)); anim.play(translateGutter); } return anim; } public void updateHeader(int notificationCount, @Nullable IconPalette palette) { Loading Loading
src/com/android/launcher3/notification/NotificationFooterLayout.java +4 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,10 @@ public class NotificationFooterLayout extends FrameLayout { @Override public void onAnimationEnd(Animator animation) { ((ViewGroup) getParent()).findViewById(R.id.divider).setVisibility(GONE); ((ViewGroup) getParent()).removeView(NotificationFooterLayout.this); // Keep view around because gutter is aligned to it, but remove height to // both hide the view and keep calculations correct for last dismissal. getLayoutParams().height = 0; requestLayout(); } }); collapseFooter.start(); Loading
src/com/android/launcher3/notification/NotificationItemView.java +18 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.launcher3.notification; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.app.Notification; import android.content.Context; import android.graphics.Rect; Loading @@ -28,7 +30,9 @@ import android.widget.FrameLayout; import android.widget.TextView; import com.android.launcher3.ItemInfo; import com.android.launcher3.LauncherAnimUtils; import com.android.launcher3.R; import com.android.launcher3.anim.PropertyResetListener; import com.android.launcher3.anim.RoundedRectRevealOutlineProvider; import com.android.launcher3.graphics.IconPalette; import com.android.launcher3.logging.UserEventDispatcher.LogContainerProvider; Loading Loading @@ -89,6 +93,8 @@ public class NotificationItemView extends PopupItemView implements LogContainerP } public Animator animateHeightRemoval(int heightToRemove, boolean shouldRemoveFromTop) { AnimatorSet anim = LauncherAnimUtils.createAnimatorSet(); Rect startRect = new Rect(mPillRect); Rect endRect = new Rect(mPillRect); if (shouldRemoveFromTop) { Loading @@ -96,8 +102,18 @@ public class NotificationItemView extends PopupItemView implements LogContainerP } else { endRect.bottom -= heightToRemove; } return new RoundedRectRevealOutlineProvider(getBackgroundRadius(), getBackgroundRadius(), startRect, endRect, mRoundedCorners).createRevealAnimator(this, false); anim.play(new RoundedRectRevealOutlineProvider(getBackgroundRadius(), getBackgroundRadius(), startRect, endRect, mRoundedCorners).createRevealAnimator(this, false)); View bottomGutter = findViewById(R.id.gutter_bottom); if (bottomGutter != null && bottomGutter.getVisibility() == VISIBLE) { Animator translateGutter = ObjectAnimator.ofFloat(bottomGutter, TRANSLATION_Y, -heightToRemove); translateGutter.addListener(new PropertyResetListener<>(TRANSLATION_Y, 0f)); anim.play(translateGutter); } return anim; } public void updateHeader(int notificationCount, @Nullable IconPalette palette) { Loading