A bug stating that you can't instantiate a RotateDrawable in Java and set it's fromDegrees and toDegrees? Or are you referring to something else that is a bug?
On Sep 28, 5:51 pm, Romain Guy <romain...@google.com> wrote: > Oh wait, sorry, you can't. File a bug, I'll try to fix that asap. > > > > > > On Mon, Sep 28, 2009 at 5:47 PM, Micah <mi...@zoltu.net> wrote: > > > In my application I want to be able to rotate a view programmatically > > rather than via XML. I can easily create a <rotate/> drawable that > > references my Drawable, but I can not figure out how to do the same > > thing in Java. The problem is that many drawables in my scene can be > > displayed either vertically or horizontally and I do not want to have > > to create a separate rotate drawable for every drawable in my scene. > > > One thought I had was to instantiate a RotateDrawable in Java and then > > use that as the background for my view, but it does not appear that > > you can set the rotation of a RotateDrawable instantiated this way > > (you have to feed it XML to get it to be at all useful from what I can > > tell). > > > Another thought I had was to rotate the canvas, but I would like to be > > able to use the drawables as view backgrounds and I do not see a way > > to rotate the canvas before the background of a view is drawn and then > > revert it afterwards. > > > I also looked into creating some generic rotate drawable and then > > perhaps changing the drawable that it applies to, but that lead no > > where. > > > So, does anyone have any ideas about how I can rotate a drawable in > > code and then use that rotated drawable as a background? > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---