mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
-> Early exploration of AllApps Hero transition with circular reveal -> Stripping a bunch of dead code from AppsCustomizeTabHost -> Moved background scrim to DragLayer -> Removed "SMALL" state from workspace: replaced with NORMAL_HIDDEN and OVERVIEW_HIDDEN. This is mainly to reduce the overall usage of the z-space model between allapps/widgets and workspace. There are vestigial remains of this model, mainly due to the overview mode, and a bit for spring-loaded. Change-Id: If2302a24394f0ec66621f01ffa2fc4934aa10c3f
26 lines
634 B
Java
26 lines
634 B
Java
package com.android.launcher3;
|
|
|
|
import android.animation.TimeInterpolator;
|
|
|
|
public class LogAccelerateInterpolator implements TimeInterpolator {
|
|
|
|
int mBase;
|
|
int mDrift;
|
|
final float mLogScale;
|
|
|
|
public LogAccelerateInterpolator(int base, int drift) {
|
|
mBase = base;
|
|
mDrift = drift;
|
|
mLogScale = 1f / computeLog(1, mBase, mDrift);
|
|
}
|
|
|
|
static float computeLog(float t, int base, int drift) {
|
|
return (float) -Math.pow(base, -t) + 1 + (drift * t);
|
|
}
|
|
|
|
@Override
|
|
public float getInterpolation(float t) {
|
|
return 1 - computeLog(1 - t, mBase, mDrift) * mLogScale;
|
|
}
|
|
}
|