feat: Add option to clear home screen in settings (#6125)
Signed-off-by: abhixv <abhi.sharma1@hotmail.com>
This commit is contained in:
1 parent
9898749619
commit
5f3a03f4fb
1577 files changed
+112559
-80244
No files matched your search
@@ -20,7 +20,6 @@ import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.Animator.AnimatorListener;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.TimeInterpolator;
|
||||
@@ -122,31 +121,19 @@ public class AnimatedPropertySetter extends PropertySetter {
|
||||
* Adds a listener to be run on every frame of the animation
|
||||
*/
|
||||
public void addOnFrameListener(ValueAnimator.AnimatorUpdateListener listener) {
|
||||
getProgressAnimator().addUpdateListener(listener);
|
||||
if (mProgressAnimator == null) {
|
||||
mProgressAnimator = ValueAnimator.ofFloat(0, 1);
|
||||
}
|
||||
|
||||
mProgressAnimator.addUpdateListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEndListener(Consumer<Boolean> listener) {
|
||||
getProgressAnimator().addListener(AnimatorListeners.forEndCallback(listener));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a callback to run on progress start.
|
||||
*/
|
||||
public void addStartListener(Runnable listener) {
|
||||
getProgressAnimator().addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
listener.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private ValueAnimator getProgressAnimator() {
|
||||
if (mProgressAnimator == null) {
|
||||
mProgressAnimator = ValueAnimator.ofFloat(0, 1);
|
||||
}
|
||||
return mProgressAnimator;
|
||||
mProgressAnimator.addListener(AnimatorListeners.forEndCallback(listener));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user