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
You could not use a ProgressBar, but rather your own Drawable resource
(e.g., a PNG file) and a RotateAnimation.
Or, you could use a pair of AnimationDrawables, each referring to the
same set of underlying PNG files, just in the opposite sequence.
On Sat, Apr 23, 2011 at 12:51 PM, B Lyon
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
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 hack...@android.com wrote:
This is basically a special class for that progress spinner
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,
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 bradfl...@gmail.com wrote:
thanks for the tips, Mark.
ProgressBar lets you change the drawables (setProgressDrawable()).
On Sat, Apr 23, 2011 at 12:59 PM, Dianne Hackborn hack...@android.comwrote:
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
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
why not simply transform the view of the progressbar, with a scale transform
along the center vertical?
--
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
thx
Are you referring to the setScaleX/Y new in SDK 11, which seems to be
certainly the way to try there?
On Sat, Apr 23, 2011 at 6:23 PM, lbendlin l...@bendlin.us wrote:
why not simply transform the view of the progressbar, with a scale transform
along the center vertical?
--
You received
On Sat, Apr 23, 2011 at 3:23 PM, lbendlin l...@bendlin.us wrote:
why not simply transform the view of the progressbar, with a scale
transform along the center vertical?
You don't know what it actually does. If the original poster for some
reason actually needs some animation that rotates
no need for that . Use a simple Canvas scaling during dispatchdraw. That is
supported all the way down to API3
@Override
protected void dispatchDraw(Canvas canvas) {
canvas.save(Canvas.MATRIX_SAVE_FLAG);
canvas.scale(-1f,1f, getWidth() * 0.5f, getHeight() * 0.5f);
Now who would commit such a user experience continuity* atrocity?
* yes, I made that up.
--
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
that is pretty simple and seemed to work (I needed to put it in an
overridden onDraw in this case)
well, there *was* a reason I was curious to see about getting it to go
counterclockwise -
and I am curious to go look at the HoneyComb one now
thx again all
On Sat, Apr 23, 2011 at 9:36 PM,
14 matches
Mail list logo