All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.daimajia.androidanimations.library.specials.in.DropOutAnimator Maven / Gradle / Ivy

There is a newer version: 2.4
Show newest version
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))
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy