mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Fix velocity in StaggeredWorkspaceAnimation.
* Velocity should match the direction of the spring values. (Swipe direction is upwards, but icons move downwards on screen). * Remove additional conversion to pxPerS since getDimension already does that. Bug: 160003774 Change-Id: I12912edb2354c4a30c538da6ca3789c46d82b94d
This commit is contained in:
committed by
Jonathan Miranda
parent
fe6d3c6221
commit
54003963d8
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.launcher3;
|
||||
|
||||
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
|
||||
|
||||
import static com.android.launcher3.BaseActivity.INVISIBLE_ALL;
|
||||
import static com.android.launcher3.BaseActivity.INVISIBLE_BY_APP_TRANSITIONS;
|
||||
import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS;
|
||||
@@ -62,7 +60,6 @@ import android.os.CancellationSignal;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Pair;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -875,10 +872,8 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
}
|
||||
});
|
||||
} else {
|
||||
float velocityDpPerS = DynamicResource.provider(mLauncher)
|
||||
float velocityPxPerS = DynamicResource.provider(mLauncher)
|
||||
.getDimension(R.dimen.unlock_staggered_velocity_dp_per_s);
|
||||
float velocityPxPerS = TypedValue.applyDimension(COMPLEX_UNIT_DIP,
|
||||
velocityDpPerS, mLauncher.getResources().getDisplayMetrics());
|
||||
anim.play(new StaggeredWorkspaceAnim(mLauncher, velocityPxPerS, false)
|
||||
.getAnimators());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user