mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Enabling springs for start dismiss animation
> Adding flag support for PendingAnimation which can be used to define custom behavior for various animations > Using SpringAnimationBuild for spring animation instead of SpringObjectanimator Change-Id: I41ca34b0574981bb3fc7894639a321c12e6feac1
This commit is contained in:
@@ -12,7 +12,6 @@ import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_VERTICAL_PROGRE
|
||||
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
|
||||
import static com.android.launcher3.config.FeatureFlags.UNSTABLE_SPRINGS;
|
||||
import static com.android.launcher3.util.SystemUiController.UI_STATE_ALL_APPS;
|
||||
|
||||
import android.animation.Animator;
|
||||
@@ -31,11 +30,8 @@ import com.android.launcher3.R;
|
||||
import com.android.launcher3.anim.AnimationSuccessListener;
|
||||
import com.android.launcher3.anim.AnimatorSetBuilder;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.anim.SpringObjectAnimator;
|
||||
import com.android.launcher3.util.DynamicResource;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.views.ScrimView;
|
||||
import com.android.systemui.plugins.ResourceProvider;
|
||||
|
||||
/**
|
||||
* Handles AllApps view transition.
|
||||
@@ -185,14 +181,6 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
|
||||
}
|
||||
|
||||
public Animator createSpringAnimation(float... progressValues) {
|
||||
if (UNSTABLE_SPRINGS.get()) {
|
||||
ResourceProvider rp = DynamicResource.provider(mLauncher);
|
||||
float damping = rp.getFloat(R.dimen.all_apps_spring_damping_ratio);
|
||||
float stiffness = rp.getFloat(R.dimen.all_apps_spring_stiffness);
|
||||
|
||||
return new SpringObjectAnimator<>(this, ALL_APPS_PROGRESS, 1f / mShiftRange,
|
||||
damping, stiffness, progressValues);
|
||||
}
|
||||
return ObjectAnimator.ofFloat(this, ALL_APPS_PROGRESS, progressValues);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user