com.daimajia.androidanimations.library.specials.in.DropOutAnimator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of library Show documentation
Show all versions of library Show documentation
Collect android animations
package com.daimajia.androidanimations.library.specials.in;
import android.animation.ObjectAnimator;
import android.view.View;
import com.daimajia.androidanimations.library.BaseViewAnimator;
import com.daimajia.easing.Glider;
import com.daimajia.easing.Skill;
public class DropOutAnimator extends BaseViewAnimator {
@Override
protected void prepare(View target) {
int distance = target.getTop() + target.getHeight();
getAnimatorAgent().playTogether(
ObjectAnimator.ofFloat(target, "alpha", 0, 1),
Glider.glide(Skill.BounceEaseOut, getDuration(), ObjectAnimator.ofFloat(target, "translationY", -distance, 0))
);
}
}