public void rotateimages(final View myView) {
myHandler = new Handler();
runnable = new Runnable() {
@Override
public void run() {
double k = 30;
double speed = Math.PI / k;
for (alpa = 0; alpa < (Math.PI * 6 + res * 2 * Math.PI / 5); alpa += speed) {
myView.setRotation((float) (myView.getRotation() - alpa));
Log.e("alpa values", String.valueOf(alpa));
k = Math.min(k + 0.2, 240);
speed = Math.PI / k;
myHandler.postDelayed(this, 100);
}
// rotateimages();
}
};
myHandler.postDelayed(runnable, 180);
}
when i run my app i can rotate only one time.what is a wrong in my code? if anyone knows solution please help me
Tom Cruser
13-Nov-2014If you want to loop , you need to define this 'runnable' loop again itself edit your code to:
Do you know your solution?