Java Code Examples for android.view.animation.AlphaAnimation#setFillBefore()

The following examples show how to use android.view.animation.AlphaAnimation#setFillBefore() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonViewAnimationActivity.java    From Android-Animation-Set with Apache License 2.0 5 votes vote down vote up
private Animation getAlphaAnimation() {
    AlphaAnimation alphaAnimation = new AlphaAnimation(1f, 0f);
    alphaAnimation.setDuration(2000);
    alphaAnimation.setRepeatCount(1);
    alphaAnimation.setFillAfter(true);
    alphaAnimation.setFillBefore(false);
    alphaAnimation.setRepeatMode(Animation.REVERSE);
    return alphaAnimation;
}
 
Example 2
Source File: CommonViewAnimationActivity.java    From Study_Android_Demo with Apache License 2.0 5 votes vote down vote up
private Animation getAlphaAnimation() {
    AlphaAnimation alphaAnimation = new AlphaAnimation(1f, 0f);
    alphaAnimation.setDuration(2000);
    alphaAnimation.setRepeatCount(1);
    alphaAnimation.setFillAfter(true);
    alphaAnimation.setFillBefore(false);
    alphaAnimation.setRepeatMode(Animation.REVERSE);
    return alphaAnimation;
}
 
Example 3
Source File: SimpleActivity.java    From butterknife with Apache License 2.0 5 votes vote down vote up
@Override public void apply(@NonNull View view, int index) {
  AlphaAnimation alphaAnimation = new AlphaAnimation(0, 1);
  alphaAnimation.setFillBefore(true);
  alphaAnimation.setDuration(500);
  alphaAnimation.setStartOffset(index * 100);
  view.startAnimation(alphaAnimation);
}