Separating the draglayer alpha into multiple dimensions so that different animaitons

can run without affecting the other.

Bug: 79323355
Bug: 78880824
Change-Id: I11cb464ebdaad0a7f0a56d4bc4c3dff1d56da16b
This commit is contained in:
Sunny Goyal
2018-05-10 16:31:00 -07:00
parent 08cf36ea54
commit 6001ea2e2f
9 changed files with 199 additions and 45 deletions

View File

@@ -22,6 +22,7 @@ import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_TRANSITION_M
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.SPRING_LOADED;
import static com.android.launcher3.dragndrop.DragLayer.ALPHA_INDEX_OVERLAY;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -1174,7 +1175,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
// different effects based on device performance. On at least one relatively high-end
// device I've tried, translating the launcher causes things to get quite laggy.
mLauncher.getDragLayer().setTranslationX(transX);
mLauncher.getDragLayer().setAlpha(alpha);
mLauncher.getDragLayer().getAlphaProperty(ALPHA_INDEX_OVERLAY).setValue(alpha);
}
/**