@@ -0,0 +1,2362 @@
+package com.pspdfkit.labs.vangogh.api;%0A%0Aimport android.support.annotation.NonNull;%0Aimport android.view.View;%0Aimport android.view.animation.CycleInterpolator;%0Aimport android.view.animation.Interpolator;%0A%0Aimport com.pspdfkit.labs.vangogh.base.AnimationBuilder;%0Aimport com.pspdfkit.labs.vangogh.rx.AnimationCompletable;%0A%0Aimport io.reactivex.Completable;%0A%0A/**%0A * Class containing convenient animations for %22shaking%22 the views.%0A */%0Apublic final class ShakeAnimations %7B%0A%0A    private static final float CYCLES_PER_SECOND_DEFAULT = 10f;%0A%0A    private static final float CYCLES_PER_SECOND_SLOW = 4f;%0A%0A    private static final float CYCLES_PER_SECOND_QUICK = 20f;%0A%0A    public static Completable shake(@NonNull View view) %7B%0A        return shake(view, AnimationConstants.DURATION_DEFAULT);%0A    %7D%0A%0A    public static Completable shake(@NonNull View view, long durationMs) %7B%0A        return shake(view, durationMs, CYCLES_PER_SECOND_DEFAULT);%0A    %7D%0A%0A    public static Completable shake(@NonNull View view, long durationMs, float cyclesPerSecond) %7B%0A        final float numberOfCycles = durationMs * (cyclesPerSecond / 1000);%0A        final CycleInterpolator interpolator = new CycleInterpolator(numberOfCycles / 2);%0A        final AnimationCompletable shakeFirst = AnimationBuilder.forView(view)%0A                .translationXBy(10f)%0A                .interpolator(interpolator)%0A                .duration(durationMs / 2)%0A                .buildCompletable();%0A        final AnimationCompletable shakeSecond = AnimationBuilder.forView(view)%0A                .translationXBy(-10f)%0A                .interpolator(interpolator)%0A                .duration(durationMs / 2)%0A                .buildCompletable();%0A        return shakeFirst.andThen(shakeSecond);%0A    %7D%0A%0A    public static Completable shakeQuickly(@NonNull View view) %7B%0A        return shake(view, AnimationConstants.DURATION_DEFAULT, CYCLES_PER_SECOND_QUICK);%0A    %7D%0A%0A    public static Completable shakeQuickly(@NonNull View view, long durationMs) %7B%0A        return shake(view, durationMs, CYCLES_PER_SECOND_QUICK);%0A    %7D%0A%0A    public static Completable shakeSlowly(@NonNull View view) %7B%0A        return shake(view, AnimationConstants.DURATION_DEFAULT, CYCLES_PER_SECOND_SLOW);%0A    %7D%0A%0A    public static Completable shakeSlowly(@NonNull View view, long durationMs) %7B%0A        return shake(view, durationMs, CYCLES_PER_SECOND_SLOW);%0A    %7D%0A%0A%7D%0A

Add initial shake animations