Skip to content

Instantly share code, notes, and snippets.

@Dmuasya
Created October 22, 2020 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dmuasya/51ea86bfc2039a13c9ed04751177b5ed to your computer and use it in GitHub Desktop.
Save Dmuasya/51ea86bfc2039a13c9ed04751177b5ed to your computer and use it in GitHub Desktop.
package com.dennis.notification.effects.lib.effects;
import android.view.View;
import com.nineoldandroids.animation.ObjectAnimator;
public class Standard extends BaseEffect{
@Override
protected void setInAnimation(View view) {
getAnimatorSet().playTogether(
ObjectAnimator.ofFloat(view, "translationY", -view.getHeight(), 0).setDuration(mDuration)
);
}
@Override
protected void setOutAnimation(View view) {
getAnimatorSet().playTogether(
ObjectAnimator.ofFloat(view, "translationY",0, -view.getHeight()).setDuration(mDuration)
);
}
@Override
protected long getAnimDuration(long duration) {
return duration;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment