please suggest me answer here code.
rotate animation rotate = new rotate animation(0, 360, animation.relative_to_self, 0.5f, animation.relative_to_self, 0.5f); rotate.setinterpolator(new linearinterpolator()); rotate.setrepeatmode(animation.infinite); rotate.computedurationhint(); rotate.setrepeatcount(animation.infinite); rotate.setduration(durationsecs); rotate.setstartoffset(-1); rotate.setfillafter(true); miv_bloodpumpspeed.startanimation(rotate);
private rotateanimation setrotatedanimation(context context, float pivotx, float pivoty, int duration) { rotateanimation rotated = new rotateanimation(0, 360, animation.relative_to_self, pivotx, animation.relative_to_self, pivoty); rotated.setinterpolator(context, android.r.anim.cycle_interpolator); rotated.setrepeatcount(animation.infinite); rotated.setrepeatmode(animation.restart); rotated.setduration(duration); return rotated; }
Comments
Post a Comment