Adding translationX to workspace card to that it is slightly visible

behind the first card

Change-Id: Idc0c169fb92510e74b983160778bd9dbacf29943
This commit is contained in:
Sunny Goyal
2017-12-21 12:40:38 -08:00
parent 8c8fdec3e9
commit 9328a51271
8 changed files with 36 additions and 18 deletions

View File

@@ -123,10 +123,8 @@ public class WorkspaceStateTransitionAnimation {
* Starts a transition animation for the workspace.
*/
private void setWorkspaceProperty(LauncherState state, PropertySetter propertySetter) {
float[] scaleAndTranslationY = state.getWorkspaceScaleAndTranslation(mLauncher);
mNewScale = scaleAndTranslationY[0];
final float finalWorkspaceTranslationY = scaleAndTranslationY[1];
float[] scaleAndTranslation = state.getWorkspaceScaleAndTranslation(mLauncher);
mNewScale = scaleAndTranslation[0];
PageAlphaProvider pageAlphaProvider = state.getWorkspacePageAlphaProvider(mLauncher);
final int childCount = mWorkspace.getChildCount();
for (int i = 0; i < childCount; i++) {
@@ -135,8 +133,10 @@ public class WorkspaceStateTransitionAnimation {
}
propertySetter.setFloat(mWorkspace, SCALE_PROPERTY, mNewScale, Interpolators.ZOOM_IN);
propertySetter.setFloat(mWorkspace, View.TRANSLATION_X,
scaleAndTranslation[1], Interpolators.ZOOM_IN);
propertySetter.setFloat(mWorkspace, View.TRANSLATION_Y,
finalWorkspaceTranslationY, Interpolators.ZOOM_IN);
scaleAndTranslation[2], Interpolators.ZOOM_IN);
float hotseatAlpha = state.getHoseatAlpha(mLauncher);
propertySetter.setViewAlpha(mWorkspace.createHotseatAlphaAnimator(hotseatAlpha),