mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Removing static launcher activity dependency from FirstFrameAnimationHelper
Static dependency does not work in the presence of multiple activities and when the main activity is not Launcher (eg in fallback recents). Instead creating FirstFrameAnimatorHelper on demand for individual animations. Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
This commit is contained in:
@@ -156,9 +156,10 @@ public class NotificationFooterLayout extends FrameLayout {
|
||||
Rect fromBounds = sTempRect;
|
||||
firstNotification.getGlobalVisibleRect(fromBounds);
|
||||
float scale = (float) toBounds.height() / fromBounds.height();
|
||||
Animator moveAndScaleIcon = ObjectAnimator.ofPropertyValuesHolder(firstNotification,
|
||||
new PropertyListBuilder().scale(scale).translationY(toBounds.top - fromBounds.top
|
||||
+ (fromBounds.height() * scale - fromBounds.height()) / 2).build());
|
||||
Animator moveAndScaleIcon = new PropertyListBuilder().scale(scale)
|
||||
.translationY(toBounds.top - fromBounds.top
|
||||
+ (fromBounds.height() * scale - fromBounds.height()) / 2)
|
||||
.build(firstNotification);
|
||||
moveAndScaleIcon.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
|
||||
Reference in New Issue
Block a user