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

The following examples show how to use android.view.animation.RotateAnimation#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: CircleRecyclerView.java    From star-zone-android with Apache License 2.0 5 votes vote down vote up
InnerRefreshIconObserver(ImageView refreshIcon, int refreshPosition) {
    this.refreshIcon = refreshIcon;
    this.refreshPosition = refreshPosition;

    viewOffsetHelper = new ViewOffsetHelper(refreshIcon);

    rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    rotateAnimation.setDuration(1000);
    rotateAnimation.setInterpolator(new LinearInterpolator());
    rotateAnimation.setRepeatCount(Animation.INFINITE);
    rotateAnimation.setFillBefore(true);

}
 
Example 2
Source File: CommonViewAnimationActivity.java    From Android-Animation-Set with Apache License 2.0 5 votes vote down vote up
private Animation getRotateAnimation() {
    RotateAnimation rotateAnimation = new RotateAnimation(0f, 360f,
            getWidth() / 2, getHeight() / 2);
    rotateAnimation.setDuration(2000);
    rotateAnimation.setRepeatCount(1);
    rotateAnimation.setFillAfter(true);
    rotateAnimation.setFillBefore(false);
    rotateAnimation.setRepeatMode(Animation.REVERSE);
    return rotateAnimation;
}
 
Example 3
Source File: CommonViewAnimationActivity.java    From Study_Android_Demo with Apache License 2.0 5 votes vote down vote up
private Animation getRotateAnimation() {
    RotateAnimation rotateAnimation = new RotateAnimation(0f, 360f,
            getWidth() / 2, getHeight() / 2);
    rotateAnimation.setDuration(2000);
    rotateAnimation.setRepeatCount(1);
    rotateAnimation.setFillAfter(true);
    rotateAnimation.setFillBefore(false);
    rotateAnimation.setRepeatMode(Animation.REVERSE);
    return rotateAnimation;
}