Search in sources :

Example 1 with RemoteFadeOutAnimationListener

use of com.android.quickstep.util.RemoteFadeOutAnimationListener in project android_packages_apps_Launcher3 by crdroidandroid.

the class BaseQuickstepLauncher method useFadeOutAnimationForLauncherStart.

@Override
public void useFadeOutAnimationForLauncherStart(CancellationSignal signal) {
    QuickstepTransitionManager appTransitionManager = getAppTransitionManager();
    appTransitionManager.setRemoteAnimationProvider(new RemoteAnimationProvider() {

        @Override
        public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets) {
            // On the first call clear the reference.
            signal.cancel();
            ValueAnimator fadeAnimation = ValueAnimator.ofFloat(1, 0);
            fadeAnimation.addUpdateListener(new RemoteFadeOutAnimationListener(appTargets, wallpaperTargets));
            AnimatorSet anim = new AnimatorSet();
            anim.play(fadeAnimation);
            return anim;
        }
    }, signal);
}
Also used : RemoteFadeOutAnimationListener(com.android.quickstep.util.RemoteFadeOutAnimationListener) RemoteAnimationTargetCompat(com.android.systemui.shared.system.RemoteAnimationTargetCompat) AnimatorSet(android.animation.AnimatorSet) ValueAnimator(android.animation.ValueAnimator) RemoteAnimationProvider(com.android.quickstep.util.RemoteAnimationProvider)

Example 2 with RemoteFadeOutAnimationListener

use of com.android.quickstep.util.RemoteFadeOutAnimationListener in project android_packages_apps_Launcher3 by AOSPA.

the class BaseQuickstepLauncher method useFadeOutAnimationForLauncherStart.

@Override
public void useFadeOutAnimationForLauncherStart(CancellationSignal signal) {
    QuickstepTransitionManager appTransitionManager = getAppTransitionManager();
    appTransitionManager.setRemoteAnimationProvider(new RemoteAnimationProvider() {

        @Override
        public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets) {
            // On the first call clear the reference.
            signal.cancel();
            ValueAnimator fadeAnimation = ValueAnimator.ofFloat(1, 0);
            fadeAnimation.addUpdateListener(new RemoteFadeOutAnimationListener(appTargets, wallpaperTargets));
            AnimatorSet anim = new AnimatorSet();
            anim.play(fadeAnimation);
            return anim;
        }
    }, signal);
}
Also used : RemoteFadeOutAnimationListener(com.android.quickstep.util.RemoteFadeOutAnimationListener) RemoteAnimationTargetCompat(com.android.systemui.shared.system.RemoteAnimationTargetCompat) AnimatorSet(android.animation.AnimatorSet) ValueAnimator(android.animation.ValueAnimator) RemoteAnimationProvider(com.android.quickstep.util.RemoteAnimationProvider)

Example 3 with RemoteFadeOutAnimationListener

use of com.android.quickstep.util.RemoteFadeOutAnimationListener in project android_packages_apps_Trebuchet by LineageOS.

the class BaseQuickstepLauncher method useFadeOutAnimationForLauncherStart.

@Override
public void useFadeOutAnimationForLauncherStart(CancellationSignal signal) {
    QuickstepAppTransitionManagerImpl appTransitionManager = (QuickstepAppTransitionManagerImpl) getAppTransitionManager();
    appTransitionManager.setRemoteAnimationProvider(new RemoteAnimationProvider() {

        @Override
        public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets) {
            // On the first call clear the reference.
            signal.cancel();
            ValueAnimator fadeAnimation = ValueAnimator.ofFloat(1, 0);
            fadeAnimation.addUpdateListener(new RemoteFadeOutAnimationListener(appTargets, wallpaperTargets));
            AnimatorSet anim = new AnimatorSet();
            anim.play(fadeAnimation);
            return anim;
        }
    }, signal);
}
Also used : RemoteFadeOutAnimationListener(com.android.quickstep.util.RemoteFadeOutAnimationListener) RemoteAnimationTargetCompat(com.android.systemui.shared.system.RemoteAnimationTargetCompat) AnimatorSet(android.animation.AnimatorSet) ValueAnimator(android.animation.ValueAnimator) RemoteAnimationProvider(com.android.quickstep.util.RemoteAnimationProvider)

Example 4 with RemoteFadeOutAnimationListener

use of com.android.quickstep.util.RemoteFadeOutAnimationListener in project Neo-Launcher by NeoApplications.

the class UiFactory method useFadeOutAnimationForLauncherStart.

public static void useFadeOutAnimationForLauncherStart(Launcher launcher, CancellationSignal cancellationSignal) {
    QuickstepAppTransitionManagerImpl appTransitionManager = (QuickstepAppTransitionManagerImpl) launcher.getAppTransitionManager();
    appTransitionManager.setRemoteAnimationProvider((targets) -> {
        // On the first call clear the reference.
        cancellationSignal.cancel();
        ValueAnimator fadeAnimation = ValueAnimator.ofFloat(1, 0);
        fadeAnimation.addUpdateListener(new RemoteFadeOutAnimationListener(targets));
        AnimatorSet anim = new AnimatorSet();
        anim.play(fadeAnimation);
        return anim;
    }, cancellationSignal);
}
Also used : RemoteFadeOutAnimationListener(com.android.quickstep.util.RemoteFadeOutAnimationListener) QuickstepAppTransitionManagerImpl(com.android.launcher3.QuickstepAppTransitionManagerImpl) AnimatorSet(android.animation.AnimatorSet) ValueAnimator(android.animation.ValueAnimator)

Example 5 with RemoteFadeOutAnimationListener

use of com.android.quickstep.util.RemoteFadeOutAnimationListener in project android_packages_apps_Launcher3 by ArrowOS.

the class BaseQuickstepLauncher method useFadeOutAnimationForLauncherStart.

@Override
public void useFadeOutAnimationForLauncherStart(CancellationSignal signal) {
    QuickstepTransitionManager appTransitionManager = getAppTransitionManager();
    appTransitionManager.setRemoteAnimationProvider(new RemoteAnimationProvider() {

        @Override
        public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets, RemoteAnimationTargetCompat[] wallpaperTargets) {
            // On the first call clear the reference.
            signal.cancel();
            ValueAnimator fadeAnimation = ValueAnimator.ofFloat(1, 0);
            fadeAnimation.addUpdateListener(new RemoteFadeOutAnimationListener(appTargets, wallpaperTargets));
            AnimatorSet anim = new AnimatorSet();
            anim.play(fadeAnimation);
            return anim;
        }
    }, signal);
}
Also used : RemoteFadeOutAnimationListener(com.android.quickstep.util.RemoteFadeOutAnimationListener) RemoteAnimationTargetCompat(com.android.systemui.shared.system.RemoteAnimationTargetCompat) AnimatorSet(android.animation.AnimatorSet) ValueAnimator(android.animation.ValueAnimator) RemoteAnimationProvider(com.android.quickstep.util.RemoteAnimationProvider)

Aggregations

AnimatorSet (android.animation.AnimatorSet)7 ValueAnimator (android.animation.ValueAnimator)7 RemoteFadeOutAnimationListener (com.android.quickstep.util.RemoteFadeOutAnimationListener)7 RemoteAnimationProvider (com.android.quickstep.util.RemoteAnimationProvider)6 RemoteAnimationTargetCompat (com.android.systemui.shared.system.RemoteAnimationTargetCompat)6 QuickstepAppTransitionManagerImpl (com.android.launcher3.QuickstepAppTransitionManagerImpl)1