List of usage examples for android.view.animation RotateAnimation setRepeatCount
public void setRepeatCount(int repeatCount)
From source file:Main.java
public static RotateAnimation getDialogRotateAnimation2() { RotateAnimation mAnim = new RotateAnimation(0, 360, Animation.RESTART, 0.5f, Animation.RESTART, 0.5f); mAnim.setDuration(2000);//from ww w . j a v a 2 s. c om mAnim.setRepeatCount(Animation.INFINITE); mAnim.setRepeatMode(Animation.RESTART); mAnim.setStartTime(Animation.START_ON_FIRST_FRAME); return mAnim; }
From source file:Main.java
public static void startRepeatSelfRotateAnimation(View v, long duration, Animation.AnimationListener listener) { RotateAnimation animation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); animation.setDuration(duration);/* www .jav a2s . c o m*/ animation.setRepeatCount(-1); // Repeat animation animation.setFillAfter(true); animation.setRepeatMode(Animation.INFINITE); // LinearInterpolator lir = new LinearInterpolator(); animation.setInterpolator(lir); if (listener != null) { animation.setAnimationListener(listener); } v.startAnimation(animation); }
From source file:Main.java
public static RotateAnimation getRotateAnimation() { RotateAnimation ra = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); ra.setDuration(1000);//w w w. j ava 2s .c o m ra.setStartOffset(0); ra.setRepeatCount(Animation.INFINITE); return ra; }
From source file:Main.java
public static Animation rotationAnimation() { final RotateAnimation rotate = new RotateAnimation(0f, 360f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); rotate.setDuration(600);//from w w w . j a v a2 s . co m rotate.setRepeatMode(Animation.RESTART); rotate.setRepeatCount(Animation.INFINITE); return rotate; }
From source file:Main.java
/** * Create a new rotating animation./*from ww w . ja v a2s . c o m*/ * @return a rotation animation */ public static RotateAnimation rotateAnimation() { RotateAnimation rotate = new RotateAnimation(0f, ROTATION, Animation.RELATIVE_TO_SELF, PIVOT, Animation.RELATIVE_TO_SELF, PIVOT); rotate.setDuration(ANIMATION_DURATION); rotate.setRepeatMode(Animation.RESTART); rotate.setRepeatCount(Animation.INFINITE); return rotate; }
From source file:Main.java
public static Animation getRotateAnimation() { final RotateAnimation rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, .5f, Animation.RELATIVE_TO_SELF, .5f); rotateAnimation.setDuration(1500);// ww w .j ava 2 s. c o m rotateAnimation.setInterpolator(new LinearInterpolator()); rotateAnimation.setRepeatCount(Animation.INFINITE); return rotateAnimation; }
From source file:Main.java
public static RotateAnimation getRotateAnimation(float fromAngle, float toAngle, float pivotX, float pivotY, int intDuration, int intRepeatCount, boolean boolFillAfter) { RotateAnimation mAnmation = new RotateAnimation(fromAngle, toAngle, Animation.RELATIVE_TO_SELF, pivotX, Animation.RELATIVE_TO_SELF, pivotY); mAnmation.setDuration(intDuration);//w w w. j a v a 2 s . c o m mAnmation.setFillAfter(boolFillAfter); if (intRepeatCount != 1) { mAnmation.setRepeatMode(Animation.RESTART); mAnmation.setRepeatCount(intRepeatCount); } // mAnmation.setInterpolator(AnimationUtils.loadInterpolator(mContext, // com.webclient.R.anim.bounce_interpolator)); mAnmation.setInterpolator(new LinearInterpolator()); return mAnmation; }
From source file:Main.java
public static void setRotateAnimation(View view, float fromAngle, float toAngle, float pivotX, float pivotY, int intDuration, int intRepeatCount, boolean boolFillAfter) { RotateAnimation mAnmation = new RotateAnimation(fromAngle, toAngle, Animation.RELATIVE_TO_SELF, pivotX, Animation.RELATIVE_TO_SELF, pivotY); mAnmation.setDuration(intDuration);//w w w . java 2 s.co m mAnmation.setFillAfter(boolFillAfter); if (intRepeatCount != 1) { mAnmation.setRepeatMode(Animation.RESTART); mAnmation.setRepeatCount(intRepeatCount); } // mAnmation.setInterpolator(AnimationUtils.loadInterpolator(mContext, // com.webclient.R.anim.bounce_interpolator)); mAnmation.setInterpolator(new LinearInterpolator()); view.startAnimation(mAnmation); }
From source file:org.tomahawk.tomahawk_android.utils.AdapterUtils.java
private static RotateAnimation constructRotateAnimation() { final RotateAnimation animation = new RotateAnimation(0.0f, 360.0f, RotateAnimation.RELATIVE_TO_SELF, 0.49f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); animation.setDuration(1500);//from w w w .jav a 2s. c o m animation.setInterpolator(new LinearInterpolator()); animation.setRepeatCount(RotateAnimation.INFINITE); return animation; }
From source file:zjut.soft.finalwork.fragment.RightFragment.java
@Override public void onResume() { super.onResume(); RotateAnimation anim = (RotateAnimation) AnimationUtils.loadAnimation(getActivity(), R.anim.gear_turning_around); anim.setRepeatCount(Animation.INFINITE); anim.setInterpolator(new LinearInterpolator()); gearIV.startAnimation(anim);/*from ww w. j av a 2 s . com*/ plannerScaleAction(); }