List of usage examples for android.view.animation RotateAnimation setFillAfter
public void setFillAfter(boolean fillAfter)
From source file:Main.java
public static void counterClockwiseRotation90ByCenter(View v) { float w = v.getWidth(); float h = v.getHeight(); RotateAnimation anim = new RotateAnimation(0, 90, w / 2, h / 2); anim.setDuration(10 * 1);// w w w .ja v a 2 s . c o m anim.setFillAfter(true); v.startAnimation(anim); }
From source file:Main.java
public static void rotateOutAnimation(RelativeLayout level, long i) { RotateAnimation animation = new RotateAnimation(0, 180, level.getWidth() / 2, level.getHeight()); animation.setFillAfter(true); animation.setDuration(500);/*from w w w .j av a 2 s. c om*/ animation.setStartOffset(i); level.startAnimation(animation); }
From source file:Main.java
public static void rotateInAnimation(RelativeLayout level, long i) { RotateAnimation animation = new RotateAnimation(180, 360, level.getWidth() / 2, level.getHeight()); animation.setFillAfter(true); animation.setDuration(500);/*from ww w . jav a 2 s. c om*/ animation.setStartOffset(i); level.startAnimation(animation); }
From source file:Main.java
public static void startAnimIn(RelativeLayout view) { RotateAnimation ra = new RotateAnimation(180, 360, view.getWidth() / 2, view.getHeight()); ra.setDuration(500);/*from w w w . j a va2 s . c om*/ ra.setFillAfter(true); view.startAnimation(ra); }
From source file:Main.java
public static void viewShow(RelativeLayout view) { RotateAnimation animation = new RotateAnimation(180, 360, view.getWidth() / 2, view.getHeight()); animation.setDuration(300);/* ww w .ja v a 2s . c o m*/ animation.setFillAfter(true); view.startAnimation(animation); }
From source file:Main.java
private static RotateAnimation generateNormalRotate(float fromDegrees, float toDegrees) { RotateAnimation anim = new RotateAnimation(fromDegrees, toDegrees, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); anim.setDuration(350);// w w w. jav a 2 s . c o m anim.setFillAfter(true); return anim; }
From source file:Main.java
public static Animation getRotateAnimation(float from, float to, int duration) { RotateAnimation animation = new RotateAnimation(from, to, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); animation.setDuration(duration);// w ww .ja va2s.c o m animation.setFillAfter(true); return animation; }
From source file:Main.java
public static Animation getRotateAnimation(float fromDegrees, float toDegrees, long durationMillis) { RotateAnimation rotate = new RotateAnimation(fromDegrees, toDegrees, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); rotate.setDuration(durationMillis);//from w w w. j av a2 s. com rotate.setFillAfter(true); return rotate; }
From source file:Main.java
public static void rotateAnimation(View view, float fromDegree, float toDegree) { final RotateAnimation rotateAnim = new RotateAnimation(fromDegree, toDegree, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); rotateAnim.setDuration(200);// ww w . ja va 2 s . c o m rotateAnim.setFillAfter(true); view.startAnimation(rotateAnim); }
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);//from w ww . j a va 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; }