Loading quickstep/src/com/android/quickstep/views/AllAppsEduView.java +12 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALL_APPS_EDU_SHOWN; import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; Loading Loading @@ -58,6 +59,9 @@ import com.android.quickstep.util.MultiValueUpdateListener; */ public class AllAppsEduView extends AbstractFloatingView { private static final float HINT_PROG_SCRIM_THRESHOLD = 0.06f; private static final float HINT_PROG_CONTENT_THRESHOLD = 0.08f; private Launcher mLauncher; private AnimatorSet mAnimation; Loading Loading @@ -143,7 +147,9 @@ public class AllAppsEduView extends AbstractFloatingView { StateAnimationConfig config = new StateAnimationConfig(); config.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(ACCEL, 0, 0.08f)); HINT_PROG_SCRIM_THRESHOLD, HINT_PROG_CONTENT_THRESHOLD)); config.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(ACCEL, 0, HINT_PROG_CONTENT_THRESHOLD)); config.duration = secondPart; config.userControlled = false; AnimatorPlaybackController stateAnimationController = Loading @@ -153,6 +159,8 @@ public class AllAppsEduView extends AbstractFloatingView { AllAppsTransitionController allAppsController = mLauncher.getAllAppsController(); PendingAnimation allAppsAlpha = new PendingAnimation(config.duration); allAppsController.setAlphas(ALL_APPS, config, allAppsAlpha); mLauncher.getWorkspace().getStateTransitionAnimation().setScrim(allAppsAlpha, ALL_APPS, config); mAnimation.play(allAppsAlpha.buildAnim()); ValueAnimator intro = ValueAnimator.ofFloat(0, 1f); Loading src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +2 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.launcher3.LauncherState.HINT_STATE; import static com.android.launcher3.LauncherState.HOTSEAT_ICONS; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.WORKSPACE_PAGE_INDICATOR; import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.ZOOM_OUT; import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER; Loading Loading @@ -168,7 +169,7 @@ public class WorkspaceStateTransitionAnimation { propertySetter.setViewBackgroundColor(mLauncher.getScrimView(), state.getWorkspaceScrimColor(mLauncher), config.getInterpolator(ANIM_SCRIM_FADE, LINEAR)); config.getInterpolator(ANIM_SCRIM_FADE, ACCEL_2)); } public void applyChildState(LauncherState state, CellLayout cl, int childIndex) { Loading src/com/android/launcher3/allapps/AllAppsContainerView.java +1 −2 Original line number Diff line number Diff line Loading @@ -134,7 +134,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo private int mHeaderColor; public AllAppsContainerView(Context context) { this(context, null); } Loading Loading @@ -842,7 +841,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo * redraws header protection */ public void invalidateHeader() { if (mScrimView != null) { if (mScrimView != null && FeatureFlags.ENABLE_DEVICE_SEARCH.get()) { mScrimView.invalidate(); } } Loading src/com/android/launcher3/allapps/AllAppsTransitionController.java +4 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.anim.PropertySetter; import com.android.launcher3.config.FeatureFlags; Loading @@ -56,6 +57,7 @@ import com.android.launcher3.views.ScrimView; */ public class AllAppsTransitionController implements StateHandler<LauncherState>, OnDeviceProfileChangeListener { private static final float CONTENT_VISIBLE_MAX_THRESHOLD = 0.5f; public static final FloatProperty<AllAppsTransitionController> ALL_APPS_PROGRESS = new FloatProperty<AllAppsTransitionController>("allAppsProgress") { Loading Loading @@ -177,7 +179,8 @@ public class AllAppsTransitionController int visibleElements = state.getVisibleElements(mLauncher); boolean hasAllAppsContent = (visibleElements & ALL_APPS_CONTENT) != 0; Interpolator allAppsFade = config.getInterpolator(ANIM_ALL_APPS_FADE, LINEAR); Interpolator allAppsFade = config.getInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(LINEAR, 0, CONTENT_VISIBLE_MAX_THRESHOLD)); setter.setViewAlpha(mAppsView, hasAllAppsContent ? 1 : 0, allAppsFade); boolean shouldProtectHeader = Loading src/com/android/launcher3/allapps/FloatingHeaderView.java +1 −1 Original line number Diff line number Diff line Loading @@ -299,7 +299,7 @@ public class FloatingHeaderView extends LinearLayout implements @Override protected void dispatchDraw(Canvas canvas) { if (mHeaderCollapsed && !mCollapsed && mTabLayout.getVisibility() == VISIBLE && mHeaderColor != Color.TRANSPARENT) { && mHeaderColor != Color.TRANSPARENT && FeatureFlags.ENABLE_DEVICE_SEARCH.get()) { mBGPaint.setColor(mHeaderColor); mBGPaint.setAlpha((int) (255 * mHeaderAnimator.getAnimatedFraction())); canvas.drawRect(0, 0, getWidth(), getHeight() + mTranslationY, mBGPaint); Loading Loading
quickstep/src/com/android/quickstep/views/AllAppsEduView.java +12 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALL_APPS_EDU_SHOWN; import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; Loading Loading @@ -58,6 +59,9 @@ import com.android.quickstep.util.MultiValueUpdateListener; */ public class AllAppsEduView extends AbstractFloatingView { private static final float HINT_PROG_SCRIM_THRESHOLD = 0.06f; private static final float HINT_PROG_CONTENT_THRESHOLD = 0.08f; private Launcher mLauncher; private AnimatorSet mAnimation; Loading Loading @@ -143,7 +147,9 @@ public class AllAppsEduView extends AbstractFloatingView { StateAnimationConfig config = new StateAnimationConfig(); config.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(ACCEL, 0, 0.08f)); HINT_PROG_SCRIM_THRESHOLD, HINT_PROG_CONTENT_THRESHOLD)); config.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(ACCEL, 0, HINT_PROG_CONTENT_THRESHOLD)); config.duration = secondPart; config.userControlled = false; AnimatorPlaybackController stateAnimationController = Loading @@ -153,6 +159,8 @@ public class AllAppsEduView extends AbstractFloatingView { AllAppsTransitionController allAppsController = mLauncher.getAllAppsController(); PendingAnimation allAppsAlpha = new PendingAnimation(config.duration); allAppsController.setAlphas(ALL_APPS, config, allAppsAlpha); mLauncher.getWorkspace().getStateTransitionAnimation().setScrim(allAppsAlpha, ALL_APPS, config); mAnimation.play(allAppsAlpha.buildAnim()); ValueAnimator intro = ValueAnimator.ofFloat(0, 1f); Loading
src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +2 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.launcher3.LauncherState.HINT_STATE; import static com.android.launcher3.LauncherState.HOTSEAT_ICONS; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.WORKSPACE_PAGE_INDICATOR; import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.ZOOM_OUT; import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER; Loading Loading @@ -168,7 +169,7 @@ public class WorkspaceStateTransitionAnimation { propertySetter.setViewBackgroundColor(mLauncher.getScrimView(), state.getWorkspaceScrimColor(mLauncher), config.getInterpolator(ANIM_SCRIM_FADE, LINEAR)); config.getInterpolator(ANIM_SCRIM_FADE, ACCEL_2)); } public void applyChildState(LauncherState state, CellLayout cl, int childIndex) { Loading
src/com/android/launcher3/allapps/AllAppsContainerView.java +1 −2 Original line number Diff line number Diff line Loading @@ -134,7 +134,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo private int mHeaderColor; public AllAppsContainerView(Context context) { this(context, null); } Loading Loading @@ -842,7 +841,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo * redraws header protection */ public void invalidateHeader() { if (mScrimView != null) { if (mScrimView != null && FeatureFlags.ENABLE_DEVICE_SEARCH.get()) { mScrimView.invalidate(); } } Loading
src/com/android/launcher3/allapps/AllAppsTransitionController.java +4 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.anim.PropertySetter; import com.android.launcher3.config.FeatureFlags; Loading @@ -56,6 +57,7 @@ import com.android.launcher3.views.ScrimView; */ public class AllAppsTransitionController implements StateHandler<LauncherState>, OnDeviceProfileChangeListener { private static final float CONTENT_VISIBLE_MAX_THRESHOLD = 0.5f; public static final FloatProperty<AllAppsTransitionController> ALL_APPS_PROGRESS = new FloatProperty<AllAppsTransitionController>("allAppsProgress") { Loading Loading @@ -177,7 +179,8 @@ public class AllAppsTransitionController int visibleElements = state.getVisibleElements(mLauncher); boolean hasAllAppsContent = (visibleElements & ALL_APPS_CONTENT) != 0; Interpolator allAppsFade = config.getInterpolator(ANIM_ALL_APPS_FADE, LINEAR); Interpolator allAppsFade = config.getInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(LINEAR, 0, CONTENT_VISIBLE_MAX_THRESHOLD)); setter.setViewAlpha(mAppsView, hasAllAppsContent ? 1 : 0, allAppsFade); boolean shouldProtectHeader = Loading
src/com/android/launcher3/allapps/FloatingHeaderView.java +1 −1 Original line number Diff line number Diff line Loading @@ -299,7 +299,7 @@ public class FloatingHeaderView extends LinearLayout implements @Override protected void dispatchDraw(Canvas canvas) { if (mHeaderCollapsed && !mCollapsed && mTabLayout.getVisibility() == VISIBLE && mHeaderColor != Color.TRANSPARENT) { && mHeaderColor != Color.TRANSPARENT && FeatureFlags.ENABLE_DEVICE_SEARCH.get()) { mBGPaint.setColor(mHeaderColor); mBGPaint.setAlpha((int) (255 * mHeaderAnimator.getAnimatedFraction())); canvas.drawRect(0, 0, getWidth(), getHeight() + mTranslationY, mBGPaint); Loading