mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Add missing animations when dragging from customize.
- Fix 3453751: Moon landing on canceled drag from customize - Fix 3453595: Use home screen "consume" animation when dragging and dropping Change-Id: Ia6a83c2d7a8f24c3ce02811547a35a7022d245f6
This commit is contained in:
@@ -257,8 +257,7 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
|
||||
sWorker.removeMessages(MESSAGE_CREATE_HOLOGRAPHIC_OUTLINE, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setChecked(boolean checked) {
|
||||
void setChecked(boolean checked, boolean animate) {
|
||||
if (mIsChecked != checked) {
|
||||
mIsChecked = checked;
|
||||
|
||||
@@ -276,14 +275,23 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
|
||||
if (mCheckedAlphaAnimator != null) {
|
||||
mCheckedAlphaAnimator.cancel();
|
||||
}
|
||||
mCheckedAlphaAnimator = ObjectAnimator.ofFloat(this, "alpha", getAlpha(), alpha);
|
||||
mCheckedAlphaAnimator.setDuration(duration);
|
||||
mCheckedAlphaAnimator.start();
|
||||
if (animate) {
|
||||
mCheckedAlphaAnimator = ObjectAnimator.ofFloat(this, "alpha", getAlpha(), alpha);
|
||||
mCheckedAlphaAnimator.setDuration(duration);
|
||||
mCheckedAlphaAnimator.start();
|
||||
} else {
|
||||
setAlpha(alpha);
|
||||
}
|
||||
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setChecked(boolean checked) {
|
||||
setChecked(checked, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return mIsChecked;
|
||||
|
||||
Reference in New Issue
Block a user