Search in sources :

Example 1 with ExpoIn

use of no.agens.depth.lib.tween.interpolators.ExpoIn in project Depth-LIB-Android- by danielzeller.

the class TransitionHelper method continueOutToRight.

private static void continueOutToRight(DepthLayout target, float moveY, int subtractDelay) {
    ObjectAnimator translationY2 = ObjectAnimator.ofFloat(target, View.TRANSLATION_Y, -moveY * target.getResources().getDisplayMetrics().density, -target.getResources().getDisplayMetrics().heightPixels).setDuration(900);
    translationY2.setInterpolator(new ExpoIn());
    translationY2.setStartDelay(0 + subtractDelay);
    translationY2.start();
    ObjectAnimator translationX2 = ObjectAnimator.ofFloat(target, View.TRANSLATION_X, target.getTranslationX(), target.getResources().getDisplayMetrics().widthPixels).setDuration(900);
    translationX2.setInterpolator(new ExpoIn());
    translationX2.setStartDelay(0 + subtractDelay);
    translationX2.start();
}
Also used : ObjectAnimator(android.animation.ObjectAnimator) ExpoIn(no.agens.depth.lib.tween.interpolators.ExpoIn)

Example 2 with ExpoIn

use of no.agens.depth.lib.tween.interpolators.ExpoIn in project Depth-LIB-Android- by danielzeller.

the class RootActivity method hideMenu.

public void hideMenu() {
    isMenuVisible = false;
    ObjectAnimator translationY = ObjectAnimator.ofFloat(menu, View.TRANSLATION_Y, menu.getHeight());
    translationY.setDuration(750);
    translationY.setInterpolator(new ExpoIn());
    translationY.start();
}
Also used : ObjectAnimator(android.animation.ObjectAnimator) ExpoIn(no.agens.depth.lib.tween.interpolators.ExpoIn)

Aggregations

ObjectAnimator (android.animation.ObjectAnimator)2 ExpoIn (no.agens.depth.lib.tween.interpolators.ExpoIn)2