Search in sources :

Example 1 with ViewOnDrawExecutor

use of com.android.launcher3.util.ViewOnDrawExecutor in project android_packages_apps_Launcher3 by crdroidandroid.

the class Launcher method finishFirstPageBind.

@Override
public void finishFirstPageBind(final ViewOnDrawExecutor executor) {
    AlphaProperty property = mDragLayer.getAlphaProperty(ALPHA_INDEX_LAUNCHER_LOAD);
    if (property.getValue() < 1) {
        ObjectAnimator anim = ObjectAnimator.ofFloat(property, MultiValueAlpha.VALUE, 1);
        if (executor != null) {
            anim.addListener(new AnimatorListenerAdapter() {

                @Override
                public void onAnimationEnd(Animator animation) {
                    executor.onLoadAnimationCompleted();
                }
            });
        }
        anim.start();
    } else if (executor != null) {
        executor.onLoadAnimationCompleted();
    }
}
Also used : AlphaProperty(com.android.launcher3.util.MultiValueAlpha.AlphaProperty) Animator(android.animation.Animator) ValueAnimator(android.animation.ValueAnimator) ObjectAnimator(android.animation.ObjectAnimator) ObjectAnimator(android.animation.ObjectAnimator) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter)

Aggregations

Animator (android.animation.Animator)1 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)1 ObjectAnimator (android.animation.ObjectAnimator)1 ValueAnimator (android.animation.ValueAnimator)1 AlphaProperty (com.android.launcher3.util.MultiValueAlpha.AlphaProperty)1