Search in sources :

Example 1 with MultiValueAlpha

use of com.android.launcher3.util.MultiValueAlpha in project android_packages_apps_Launcher3 by AOSPA.

the class TaskbarLauncherStateController method init.

public void init(TaskbarControllers controllers, BaseQuickstepLauncher launcher) {
    mControllers = controllers;
    mLauncher = launcher;
    mTaskbarBackgroundAlpha = mControllers.taskbarDragLayerController.getTaskbarBackgroundAlpha();
    MultiValueAlpha taskbarIconAlpha = mControllers.taskbarViewController.getTaskbarIconAlpha();
    mIconAlphaForHome = taskbarIconAlpha.getProperty(ALPHA_INDEX_HOME);
    mIconAlphaForHome.setConsumer((Consumer<Float>) alpha -> mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1));
    mIconAlignmentForResumedState.finishAnimation();
    onIconAlignmentRatioChangedForAppAndHomeTransition();
    mLauncher.getStateManager().addStateListener(mStateListener);
    // Initialize to the current launcher state
    updateStateForFlag(FLAG_RESUMED, launcher.hasBeenResumed());
    mLauncherState = launcher.getStateManager().getState();
    applyState(0);
}
Also used : AnimatedFloat(com.android.quickstep.AnimatedFloat) NonNull(androidx.annotation.NonNull) ObjectAnimator(android.animation.ObjectAnimator) RecentsAnimationController(com.android.quickstep.RecentsAnimationController) FLAG_IN_APP(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_APP) BaseQuickstepLauncher(com.android.launcher3.BaseQuickstepLauncher) StateManager(com.android.launcher3.statemanager.StateManager) RecentsAnimationCallbacks(com.android.quickstep.RecentsAnimationCallbacks) HashMap(java.util.HashMap) Animator(android.animation.Animator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) Supplier(java.util.function.Supplier) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) TASKBAR_STASH_DURATION(com.android.launcher3.taskbar.TaskbarStashController.TASKBAR_STASH_DURATION) LauncherState(com.android.launcher3.LauncherState) Consumer(java.util.function.Consumer) FLAG_IN_STASHED_LAUNCHER_STATE(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE) ALPHA_INDEX_HOME(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_HOME) ThumbnailData(com.android.systemui.shared.recents.model.ThumbnailData) AnimatorSet(android.animation.AnimatorSet) RecentsView(com.android.quickstep.views.RecentsView) AnimatedFloat(com.android.quickstep.AnimatedFloat) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha)

Example 2 with MultiValueAlpha

use of com.android.launcher3.util.MultiValueAlpha in project android_packages_apps_Launcher3 by ProtonAOSP.

the class TaskbarLauncherStateController method init.

public void init(TaskbarControllers controllers, BaseQuickstepLauncher launcher) {
    mControllers = controllers;
    mLauncher = launcher;
    mTaskbarBackgroundAlpha = mControllers.taskbarDragLayerController.getTaskbarBackgroundAlpha();
    MultiValueAlpha taskbarIconAlpha = mControllers.taskbarViewController.getTaskbarIconAlpha();
    mIconAlphaForHome = taskbarIconAlpha.getProperty(ALPHA_INDEX_HOME);
    mIconAlphaForHome.setConsumer((Consumer<Float>) alpha -> mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1));
    mIconAlignmentForResumedState.finishAnimation();
    onIconAlignmentRatioChangedForAppAndHomeTransition();
    mLauncher.getStateManager().addStateListener(mStateListener);
    // Initialize to the current launcher state
    updateStateForFlag(FLAG_RESUMED, launcher.hasBeenResumed());
    mLauncherState = launcher.getStateManager().getState();
    applyState(0);
}
Also used : AnimatedFloat(com.android.quickstep.AnimatedFloat) NonNull(androidx.annotation.NonNull) ObjectAnimator(android.animation.ObjectAnimator) RecentsAnimationController(com.android.quickstep.RecentsAnimationController) FLAG_IN_APP(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_APP) BaseQuickstepLauncher(com.android.launcher3.BaseQuickstepLauncher) StateManager(com.android.launcher3.statemanager.StateManager) RecentsAnimationCallbacks(com.android.quickstep.RecentsAnimationCallbacks) HashMap(java.util.HashMap) Animator(android.animation.Animator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) Supplier(java.util.function.Supplier) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) TASKBAR_STASH_DURATION(com.android.launcher3.taskbar.TaskbarStashController.TASKBAR_STASH_DURATION) LauncherState(com.android.launcher3.LauncherState) Consumer(java.util.function.Consumer) FLAG_IN_STASHED_LAUNCHER_STATE(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE) ALPHA_INDEX_HOME(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_HOME) ThumbnailData(com.android.systemui.shared.recents.model.ThumbnailData) AnimatorSet(android.animation.AnimatorSet) RecentsView(com.android.quickstep.views.RecentsView) AnimatedFloat(com.android.quickstep.AnimatedFloat) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha)

Example 3 with MultiValueAlpha

use of com.android.launcher3.util.MultiValueAlpha in project android_packages_apps_404Launcher by P-404.

the class TaskbarLauncherStateController method init.

public void init(TaskbarControllers controllers, BaseQuickstepLauncher launcher) {
    mControllers = controllers;
    mLauncher = launcher;
    mTaskbarBackgroundAlpha = mControllers.taskbarDragLayerController.getTaskbarBackgroundAlpha();
    MultiValueAlpha taskbarIconAlpha = mControllers.taskbarViewController.getTaskbarIconAlpha();
    mIconAlphaForHome = taskbarIconAlpha.getProperty(ALPHA_INDEX_HOME);
    mIconAlphaForHome.setConsumer((Consumer<Float>) alpha -> mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1));
    mIconAlignmentForResumedState.finishAnimation();
    onIconAlignmentRatioChangedForAppAndHomeTransition();
    mLauncher.getStateManager().addStateListener(mStateListener);
    // Initialize to the current launcher state
    updateStateForFlag(FLAG_RESUMED, launcher.hasBeenResumed());
    mLauncherState = launcher.getStateManager().getState();
    applyState(0);
}
Also used : AnimatedFloat(com.android.quickstep.AnimatedFloat) NonNull(androidx.annotation.NonNull) ObjectAnimator(android.animation.ObjectAnimator) RecentsAnimationController(com.android.quickstep.RecentsAnimationController) FLAG_IN_APP(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_APP) BaseQuickstepLauncher(com.android.launcher3.BaseQuickstepLauncher) StateManager(com.android.launcher3.statemanager.StateManager) RecentsAnimationCallbacks(com.android.quickstep.RecentsAnimationCallbacks) HashMap(java.util.HashMap) Animator(android.animation.Animator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) Supplier(java.util.function.Supplier) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) TASKBAR_STASH_DURATION(com.android.launcher3.taskbar.TaskbarStashController.TASKBAR_STASH_DURATION) LauncherState(com.android.launcher3.LauncherState) Consumer(java.util.function.Consumer) FLAG_IN_STASHED_LAUNCHER_STATE(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE) ALPHA_INDEX_HOME(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_HOME) ThumbnailData(com.android.systemui.shared.recents.model.ThumbnailData) AnimatorSet(android.animation.AnimatorSet) RecentsView(com.android.quickstep.views.RecentsView) AnimatedFloat(com.android.quickstep.AnimatedFloat) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha)

Example 4 with MultiValueAlpha

use of com.android.launcher3.util.MultiValueAlpha in project android_packages_apps_Launcher3 by ArrowOS.

the class TaskbarLauncherStateController method init.

public void init(TaskbarControllers controllers, BaseQuickstepLauncher launcher) {
    mControllers = controllers;
    mLauncher = launcher;
    mTaskbarBackgroundAlpha = mControllers.taskbarDragLayerController.getTaskbarBackgroundAlpha();
    MultiValueAlpha taskbarIconAlpha = mControllers.taskbarViewController.getTaskbarIconAlpha();
    mIconAlphaForHome = taskbarIconAlpha.getProperty(ALPHA_INDEX_HOME);
    mIconAlphaForHome.setConsumer((Consumer<Float>) alpha -> mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1));
    mIconAlignmentForResumedState.finishAnimation();
    onIconAlignmentRatioChangedForAppAndHomeTransition();
    mLauncher.getStateManager().addStateListener(mStateListener);
    // Initialize to the current launcher state
    updateStateForFlag(FLAG_RESUMED, launcher.hasBeenResumed());
    mLauncherState = launcher.getStateManager().getState();
    applyState(0);
}
Also used : AnimatedFloat(com.android.quickstep.AnimatedFloat) NonNull(androidx.annotation.NonNull) ObjectAnimator(android.animation.ObjectAnimator) RecentsAnimationController(com.android.quickstep.RecentsAnimationController) FLAG_IN_APP(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_APP) BaseQuickstepLauncher(com.android.launcher3.BaseQuickstepLauncher) StateManager(com.android.launcher3.statemanager.StateManager) RecentsAnimationCallbacks(com.android.quickstep.RecentsAnimationCallbacks) HashMap(java.util.HashMap) Animator(android.animation.Animator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) Supplier(java.util.function.Supplier) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) TASKBAR_STASH_DURATION(com.android.launcher3.taskbar.TaskbarStashController.TASKBAR_STASH_DURATION) LauncherState(com.android.launcher3.LauncherState) Consumer(java.util.function.Consumer) FLAG_IN_STASHED_LAUNCHER_STATE(com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE) ALPHA_INDEX_HOME(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_HOME) ThumbnailData(com.android.systemui.shared.recents.model.ThumbnailData) AnimatorSet(android.animation.AnimatorSet) RecentsView(com.android.quickstep.views.RecentsView) AnimatedFloat(com.android.quickstep.AnimatedFloat) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha)

Aggregations

Animator (android.animation.Animator)4 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)4 AnimatorSet (android.animation.AnimatorSet)4 ObjectAnimator (android.animation.ObjectAnimator)4 NonNull (androidx.annotation.NonNull)4 BaseQuickstepLauncher (com.android.launcher3.BaseQuickstepLauncher)4 LauncherState (com.android.launcher3.LauncherState)4 StateManager (com.android.launcher3.statemanager.StateManager)4 FLAG_IN_APP (com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_APP)4 FLAG_IN_STASHED_LAUNCHER_STATE (com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE)4 TASKBAR_STASH_DURATION (com.android.launcher3.taskbar.TaskbarStashController.TASKBAR_STASH_DURATION)4 ALPHA_INDEX_HOME (com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_HOME)4 MultiValueAlpha (com.android.launcher3.util.MultiValueAlpha)4 AnimatedFloat (com.android.quickstep.AnimatedFloat)4 RecentsAnimationCallbacks (com.android.quickstep.RecentsAnimationCallbacks)4 RecentsAnimationController (com.android.quickstep.RecentsAnimationController)4 RecentsView (com.android.quickstep.views.RecentsView)4 ThumbnailData (com.android.systemui.shared.recents.model.ThumbnailData)4 HashMap (java.util.HashMap)4 Consumer (java.util.function.Consumer)4