Created
October 22, 2020 11:57
-
-
Save Dmuasya/51ea86bfc2039a13c9ed04751177b5ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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