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:
1 parent
a88b213087
commit
5f44542560
12 files changed
+208
-133
No files matched your search
@@ -243,8 +243,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
|
||||
return mIsChecked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setChecked(boolean checked) {
|
||||
void setChecked(boolean checked, boolean animate) {
|
||||
if (mIsChecked != checked) {
|
||||
mIsChecked = checked;
|
||||
|
||||
@@ -262,14 +261,23 @@ public class PagedViewIcon extends CachedTextView 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 void toggle() {
|
||||
setChecked(!mIsChecked);
|
||||
|
||||
Reference in new issue
Block a user