Diane it does have a public "setIndeterminateDrawable" - I can set it with a RotateDrawable and it works to spin whatever I want there... which is cool and easy... it just apparently does it clockwise only... I just need to replace it with something that can spin stuff backwards.... and I need to learn the other stuff anyway.
On Sat, Apr 23, 2011 at 3:59 PM, Dianne Hackborn <[email protected]> wrote: > I don't know off-hand if progress bar has an API to set the drawable. If > so, just use that. If not you'll need to roll your own. It would probably > be easy to copy the code out of the framework. > > On Sat, Apr 23, 2011 at 12:52 PM, B Lyon <[email protected]> wrote: >> >> thanks for the tips, Mark. I'll play with it. It might need to be an >> animation list or whatever >> >> btw - RotateDrawable would be a two-line way to do it (custom little >> icon seems to get animated fine) to replace the indeterminate >> drawable, but RotateDrawable seems to insist on rotating clockwise, >> too... it sets toDegrees to max (fromDegrees, toDegrees), so you can't >> specify it go from 360 to 0. >> >> Dianne - in looking at your note again, I can't tell if you were >> suggesting that the best thing to do (for someone want to do this in >> the first place) would be to replace the progress bar functionality >> wholesale (yes overkill). Of course I want to avoid depending on >> internals or anything else in the API susceptible to change. >> >> >> On Sat, Apr 23, 2011 at 1:50 PM, B Lyon <[email protected]> wrote: >> > thanks Dianne - yeah I expected someone asking that >> > >> > custom seems to be where I need to go if this is to be messed with at >> > all, and that's what I needed to know >> > >> > On Sat, Apr 23, 2011 at 1:45 PM, Dianne Hackborn <[email protected]> >> > wrote: >> >> This is basically a special class for that progress spinner design. >> >> Which >> >> is now old. In HC the spinner looks different. If you try to hack on >> >> whatever spinner you happen to get from the platform you are running on >> >> to >> >> do something different, you will probably fail in one way or another as >> >> you >> >> encounter a different platform with a different spinner. >> >> I can't imagine why you need to have it rotate in the other direction, >> >> but >> >> if you need something different you should just make your own spinner >> >> style >> >> that has nothing to do with whatever is in the platform. >> >> >> >> On Sat, Apr 23, 2011 at 9:51 AM, B Lyon <[email protected]> wrote: >> >>> >> >>> I was looking into a simple way to get the (small) ProgressBar to spin >> >>> counterclockwise, and it seems to come down to the class >> >>> AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise >> >>> - it sets the angle increment to 360/framesCount, with no apparent >> >>> option to change the sign of the increment. Most people probably have >> >>> come to expect that, I guess. >> >>> >> >>> A lot about this (public) class AnimatedRotateDrawable seems to be >> >>> kind of hands-off - two of the attributes are private somehow >> >>> (framesCount and frameDuration), and I couldn't subclass it in a quick >> >>> attempt to see about trying to tweak this behavior (not that >> >>> subclassing would have worked). >> >>> >> >>> In my case, if I am showing the spinning progress bar at all (which I >> >>> don't need to - I think that it's just a nice touch), then I need to >> >>> be able to flip the direction. Before I get off of this little >> >>> distraction for the moment, I was wondering if any one else had played >> >>> with this before. I guess I could just assimilate the class, add >> >>> assumed-to-be trivial changes for the flip option, and then change the >> >>> indeterminate drawable on the progressbar in the code, but I was >> >>> wondering if I'm missing some obviously simpler way. >> >>> >> >>> thx >> >>> >> >>> -- >> >>> 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 >> >> >> >> >> >> >> >> -- >> >> Dianne Hackborn >> >> Android framework engineer >> >> [email protected] >> >> >> >> Note: please don't send private questions to me, as I don't have time >> >> to >> >> provide private support, and so won't reply to such e-mails. 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 >> >> [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 >> > >> >> -- >> 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 > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. 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 [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 -- 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

