I would like to get user input with EditText (type is signed number) and 
(onButtonClick) use that char sequence as the "toDegrees" attribute of a 
RotationAnimation to rotate a compass ring to the number of degrees that the 
user entered. I can create the animation with a number and the rotation works 
but if I replace the number with a variable (float) it does not.
Any suggestions greatly appreciated. Perhaps a totally different approach to 
turning the degrees ring?


RotateAnimation myanim = new RotateAnimation 
(0,278,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f,);

(The above works)

float rot = degrees.getText().toString();
RotateAnimation myanim = new RotateAnimation 
(0,rot,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f,);

(Does not work)


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to