I am making a simple compass app for android. The rotation are okay, but it's laggy.
I have the fallowing code inside the method onSensorChanged()
:
RotateAnimation ra = new RotateAnimation(this.currentDegree,
-degree, Animation.RELATIVE_TO_SELF, 0.5f,
Animation.RELATIVE_TO_SELF, 0.5f);
ra.setDuration(0);
ra.setFillAfter(true);
this.image.startAnimation(ra);
How can I make this more fluid?
Thank you, cumps!