Search in sources :

Example 1 with BaseQuickstepLauncher

use of com.android.launcher3.BaseQuickstepLauncher in project android_packages_apps_Launcher3 by crdroidandroid.

the class LauncherActivityInterface method onOverviewServiceBound.

@Override
void onOverviewServiceBound() {
    final BaseQuickstepLauncher activity = getCreatedActivity();
    if (activity == null)
        return;
    activity.getAppTransitionManager().registerRemoteTransitions();
}
Also used : BaseQuickstepLauncher(com.android.launcher3.BaseQuickstepLauncher)

Example 2 with BaseQuickstepLauncher

use of com.android.launcher3.BaseQuickstepLauncher in project android_packages_apps_Launcher3 by crdroidandroid.

the class LauncherActivityInterface method prepareRecentsUI.

@Override
public AnimationFactory prepareRecentsUI(RecentsAnimationDeviceState deviceState, boolean activityVisible, Consumer<AnimatorControllerWithResistance> callback) {
    notifyRecentsOfOrientation(deviceState.getRotationTouchHelper());
    DefaultAnimationFactory factory = new DefaultAnimationFactory(callback) {

        @Override
        protected void createBackgroundToOverviewAnim(BaseQuickstepLauncher activity, PendingAnimation pa) {
            super.createBackgroundToOverviewAnim(activity, pa);
            // Animate the blur and wallpaper zoom
            float fromDepthRatio = BACKGROUND_APP.getDepth(activity);
            float toDepthRatio = OVERVIEW.getDepth(activity);
            pa.addFloat(getDepthController(), new ClampedDepthProperty(fromDepthRatio, toDepthRatio), fromDepthRatio, toDepthRatio, LINEAR);
        }
    };
    BaseQuickstepLauncher launcher = factory.initUI();
    // Since all apps is not visible, we can safely reset the scroll position.
    // This ensures then the next swipe up to all-apps starts from scroll 0.
    launcher.getAppsView().reset(false);
    return factory;
}
Also used : PendingAnimation(com.android.launcher3.anim.PendingAnimation) BaseQuickstepLauncher(com.android.launcher3.BaseQuickstepLauncher) ClampedDepthProperty(com.android.launcher3.statehandlers.DepthController.ClampedDepthProperty)

Example 3 with BaseQuickstepLauncher

use of com.android.launcher3.BaseQuickstepLauncher in project android_packages_apps_Launcher3 by crdroidandroid.

the class StaggeredWorkspaceAnim method addDepthAnimationForState.

private void addDepthAnimationForState(Launcher launcher, LauncherState state, long duration) {
    if (!(launcher instanceof BaseQuickstepLauncher)) {
        return;
    }
    PendingAnimation builder = new PendingAnimation(duration);
    DepthController depthController = ((BaseQuickstepLauncher) launcher).getDepthController();
    depthController.setStateWithAnimation(state, new StateAnimationConfig(), builder);
    mAnimators.play(builder.buildAnim());
}
Also used : PendingAnimation(com.android.launcher3.anim.PendingAnimation) BaseQuickstepLauncher(com.android.launcher3.BaseQuickstepLauncher) StateAnimationConfig(com.android.launcher3.states.StateAnimationConfig) DepthController(com.android.launcher3.statehandlers.DepthController)

Aggregations

BaseQuickstepLauncher (com.android.launcher3.BaseQuickstepLauncher)3 PendingAnimation (com.android.launcher3.anim.PendingAnimation)2 DepthController (com.android.launcher3.statehandlers.DepthController)1 ClampedDepthProperty (com.android.launcher3.statehandlers.DepthController.ClampedDepthProperty)1 StateAnimationConfig (com.android.launcher3.states.StateAnimationConfig)1