Romain Guy wrote: > There is absolutely no need to do all these fancy computations > yourself. Instead you can use the following constructor (or better > yet, define the animation in XML): > > RotateAnimation(float fromDegrees, float toDegrees, int pivotXType, > float pivotXValue, int pivotYType, float pivotYValue)
> Here is an example: > > new RotateAnimation(0.0f, 180.0f, Animation.RELATIVE_TO_SELF, 0.5f, > Animation.RELATIVE_TO_SELF, 0.5f); > > This animation will rotate about the center of the animated View. Except that padding is included in the View bounds for the purposes of RotateAnimation. So, if you are using padding to control the position of a widget, you need to take that padding into account when determining the pivot point. Of course, it now dawns on me that the padding probably gets rotated too, so I'm leaning more toward using shims or something to set my position. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

