use of android.view.animation.RotateAnimation in project curb by irijwj.
the class AutoFitAdapter method animOpen.
private void animOpen(final View expandView, final ImageView rotateView) {
expandView.setAlpha(0);
float from = 0.0f;
float to = 180.0f;
RotateAnimation lc_rotateAnimation = new RotateAnimation(from, to, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
lc_rotateAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
lc_rotateAnimation.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
rotateView.setImageResource(R.drawable.ic_info_item_less);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
Animator mOpenValueAnimator = createDropAnim(expandView, 0, mHiddenViewMeasuredHeight);
mOpenValueAnimator.start();
rotateView.startAnimation(lc_rotateAnimation);
}
use of android.view.animation.RotateAnimation in project MyJapanese by 54wall.
the class LayoutAnimationHelper method getAnimationSetRotation.
/**
* 旋转动画
*
* @return
*/
public AnimationSet getAnimationSetRotation() {
AnimationSet animationSet = new AnimationSet(true);
RotateAnimation rotateAnimation = new RotateAnimation(30, 0, RELATIVE_TO_SELF, 0.5f, RELATIVE_TO_SELF, 0.5f);
rotateAnimation.setDuration(400);
rotateAnimation.setInterpolator(new DecelerateInterpolator());
animationSet.addAnimation(rotateAnimation);
animationSet.setDuration(400);
return animationSet;
}
use of android.view.animation.RotateAnimation in project LiYuJapanese by 54wall.
the class LayoutAnimationHelper method getAnimationSetRotation.
/**
* 旋转动画
*
* @return
*/
public AnimationSet getAnimationSetRotation() {
AnimationSet animationSet = new AnimationSet(true);
RotateAnimation rotateAnimation = new RotateAnimation(30, 0, RELATIVE_TO_SELF, 0.5f, RELATIVE_TO_SELF, 0.5f);
rotateAnimation.setDuration(400);
rotateAnimation.setInterpolator(new DecelerateInterpolator());
animationSet.addAnimation(rotateAnimation);
animationSet.setDuration(400);
return animationSet;
}
use of android.view.animation.RotateAnimation in project AndroidUtilLib by SiberiaDante.
the class SDRotateLayoutImageView method initAnimator.
private void initAnimator() {
rotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
rotate.setRepeatCount(-1);
rotate.setInterpolator(new LinearInterpolator());
rotate.setDuration(800);
rotate.setFillAfter(true);
imageView.startAnimation(rotate);
isAnimatorStart = true;
}
use of android.view.animation.RotateAnimation in project robolectric by robolectric.
the class ShadowAnimationSetTest method start_shouldRunAnimation.
@Test
@Ignore("Needs additional work")
public void start_shouldRunAnimation() {
final AnimationSet set = new AnimationSet(true);
final Animation move = new TranslateAnimation(0, 100, 0, 100);
move.setDuration(1000);
move.setAnimationListener(moveListener);
final Animation spin = new RotateAnimation(0, 360);
spin.setDuration(1000);
spin.setStartOffset(1000);
spin.setAnimationListener(spinListener);
set.start();
verify(moveListener).onAnimationStart(move);
Robolectric.flushForegroundThreadScheduler();
verify(moveListener).onAnimationEnd(move);
}
Aggregations