mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Update FloatingIconView to display PreloadIconDrawables during swipe home animations.
Swiping up to go home on an app that is downloading incrementally would cause a jittery animation. Updated FloatingIconView to animate directly to a PreloadIconDrawable.
Demo: https://drive.google.com/file/d/1ddr8OGR4c1ZneyQ0VkkAAxGpwNcP8Wyn/view?usp=sharing
Fixes: 177685929
Test: manual
Change-Id: I4cd2daa18f6d3fed42a9b666063e0b1c1c46e5d9
(cherry picked from commit b8cab8d878)
This commit is contained in:
@@ -276,15 +276,15 @@ public class FastBitmapDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public ConstantState getConstantState() {
|
||||
return new MyConstantState(mBitmap, mIconColor, mIsDisabled);
|
||||
return new FastBitmapConstantState(mBitmap, mIconColor, mIsDisabled);
|
||||
}
|
||||
|
||||
protected static class MyConstantState extends ConstantState {
|
||||
protected static class FastBitmapConstantState extends ConstantState {
|
||||
protected final Bitmap mBitmap;
|
||||
protected final int mIconColor;
|
||||
protected final boolean mIsDisabled;
|
||||
|
||||
public MyConstantState(Bitmap bitmap, int color, boolean isDisabled) {
|
||||
public FastBitmapConstantState(Bitmap bitmap, int color, boolean isDisabled) {
|
||||
mBitmap = bitmap;
|
||||
mIconColor = color;
|
||||
mIsDisabled = isDisabled;
|
||||
|
||||
Reference in New Issue
Block a user