mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Change overview animation to scale instead of translationX
As you swipe up to overview from home, workspace scales down and fades out as before, and now recents scales down from 1.2f on top of it. The interpolators are set such that the workspace animation is seen before the recents animation. Also, we don't scale down all of recents, only the visible pages (current and adjacent). Change-Id: I5f8bfe8cafeaa41d26873c63549735d7bdff2bce
This commit is contained in:
@@ -31,7 +31,6 @@ import com.android.launcher3.anim.AnimatorSetBuilder;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.graphics.ViewScrim;
|
||||
import com.android.launcher3.uioverrides.UiFactory;
|
||||
|
||||
/**
|
||||
* Manages the animations between each of the workspace states.
|
||||
@@ -74,11 +73,11 @@ public class WorkspaceStateTransitionAnimation {
|
||||
propertySetter);
|
||||
}
|
||||
|
||||
propertySetter.setFloat(mWorkspace, SCALE_PROPERTY, mNewScale, Interpolators.ZOOM_IN);
|
||||
propertySetter.setFloat(mWorkspace, SCALE_PROPERTY, mNewScale, Interpolators.ZOOM_OUT);
|
||||
propertySetter.setFloat(mWorkspace, View.TRANSLATION_X,
|
||||
scaleAndTranslation[1], Interpolators.ZOOM_IN);
|
||||
scaleAndTranslation[1], Interpolators.ZOOM_OUT);
|
||||
propertySetter.setFloat(mWorkspace, View.TRANSLATION_Y,
|
||||
scaleAndTranslation[2], Interpolators.ZOOM_IN);
|
||||
scaleAndTranslation[2], Interpolators.ZOOM_OUT);
|
||||
|
||||
int elements = state.getVisibleElements(mLauncher);
|
||||
float hotseatIconsAlpha = (elements & HOTSEAT_ICONS) != 0 ? 1 : 0;
|
||||
@@ -113,7 +112,7 @@ public class WorkspaceStateTransitionAnimation {
|
||||
int drawableAlpha = Math.round(pageAlpha * (state.hasWorkspacePageBackground ? 255 : 0));
|
||||
|
||||
propertySetter.setInt(cl.getScrimBackground(),
|
||||
DRAWABLE_ALPHA, drawableAlpha, Interpolators.ZOOM_IN);
|
||||
DRAWABLE_ALPHA, drawableAlpha, Interpolators.ZOOM_OUT);
|
||||
propertySetter.setFloat(cl.getShortcutsAndWidgets(), View.ALPHA,
|
||||
pageAlpha, pageAlphaProvider.interpolator);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user