@@ -0,0 +1,2617 @@
+package com.pspdfkit.labs.vangogh.api;%0A%0Aimport android.support.annotation.NonNull;%0Aimport android.view.View;%0Aimport android.view.animation.Interpolator;%0Aimport android.view.animation.LinearInterpolator;%0A%0Aimport com.pspdfkit.labs.vangogh.base.AnimationBuilder;%0Aimport com.pspdfkit.labs.vangogh.rx.AnimationCompletable;%0A%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport io.reactivex.Completable;%0A%0A/**%0A * Holds methods to animate view to display as toast, coming from invisible to visible.%0A */%0Apublic class ToastAnimations %7B%0A%0A    private static final long FADE_DURATION = 1000L;%0A%0A    private static final long VIEW_SHOW_DURATION_DEFAULT = 2000L;%0A%0A    private static final long VIEW_SHOW_DURATION_QUICK = 1000L;%0A%0A    private static final long VIEW_SHOW_DURATION_SLOW = 1000L;%0A%0A    private static final Interpolator INTERPOLATOR = new LinearInterpolator();%0A%0A    public static Completable showAsToast(@NonNull View view) %7B%0A        return showAsToast(view, VIEW_SHOW_DURATION_DEFAULT, INTERPOLATOR);%0A    %7D%0A%0A    public static Completable showAsToast(@NonNull View view, long durationMs) %7B%0A        return showAsToast(view, durationMs, INTERPOLATOR);%0A    %7D%0A%0A    public static Completable showAsToast(@NonNull View view, Interpolator interpolator) %7B%0A        return showAsToast(view, VIEW_SHOW_DURATION_DEFAULT, interpolator);%0A    %7D%0A%0A    public static Completable showAsToast(@NonNull View view, long durationMs, Interpolator interpolator) %7B%0A        final AnimationCompletable fadeIn = AnimationBuilder.forView(view)%0A                .alpha(1f)%0A                .duration(FADE_DURATION)%0A                .interpolator(interpolator)%0A                .buildCompletable();%0A        final AnimationCompletable fadeOut = AnimationBuilder.forView(view)%0A                .alpha(0f)%0A                .duration(FADE_DURATION)%0A                .interpolator(interpolator)%0A                .buildCompletable();%0A        return fadeIn.andThen(Completable.timer(durationMs, TimeUnit.MILLISECONDS)).andThen(fadeOut);%0A    %7D%0A%0A    public static Completable showAsToastQuickly(@NonNull View view) %7B%0A        return showAsToast(view, VIEW_SHOW_DURATION_QUICK);%0A    %7D%0A%0A    public static Completable showAsToastQuickly(@NonNull View view, Interpolator interpolator) %7B%0A        return showAsToast(view, VIEW_SHOW_DURATION_QUICK, interpolator);%0A    %7D%0A%0A    public static Completable showAsToastSlowly(@NonNull View view) %7B%0A        return showAsToast(view, VIEW_SHOW_DURATION_SLOW);%0A    %7D%0A%0A    public static Completable showAsToastSlowly(@NonNull View view, Interpolator interpolator) %7B%0A        return showAsToast(view, VIEW_SHOW_DURATION_SLOW, interpolator);%0A    %7D%0A%0A%7D%0A

Add initial toast animations