You're probably looking for AnimatedImageView instead of ImageView,
which will trigger the animation automatically once its visible.
Here's an example in an XML layout:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/layout/status_bar_latest_event_content.xml;hb=cupcake#l15

j

On Wed, May 13, 2009 at 1:29 PM, Al <[email protected]> wrote:
>
> Forgot to mention, the progress indicator is indeterminate, like you
> have in an Activity with Window.FEATURE_INDETERMINATE_PROGRESS.
>
> I've had a look at RotateDrawable, which seems to be the correct thing
> for me to use. The docs say a RotateDrawable should be used with an
> xml that uses <rotate>. I've tried various methods to get it to
> animate:
>
> img.setImageDrawable(getResources().getDrawable(R.drawable.progress))
> img.setImageDrawable((RotateDrawable) getResources().getDrawable
> (R.drawable.progress))
> and img.setImageDrawable(R.drawable.progress)
>
> All of these bring up a static image. Just to clarify, I think it
> might have been unclear earlier, my ListView row looks like this: |
> [Text           ][Image]| where | is a boundary of a view container.
> The image box can contain various images to indicate the state of
> background activity, a red circle to indicate something wrong, green
> to show nothing unexpected has happened, etc. The indeterminate
> progress (should) show up when the user requests an operation that
> will (possible) take a while to complete.
>
> On May 13, 6:14 pm, Jeff Sharkey <[email protected]> wrote:
>> > ProgressBar widget won't work in this case since the progress
>> > animation is shown depending on background activity associated with
>> > each list row.
>>
>> The widget approach would seem to work--just use
>> android:visibility="gone" until you're ready to show it with
>> setVisibility(View.VISIBLE).
>>
>> --
>> Jeff Sharkey
>> [email protected]
> >
>



-- 
Jeff Sharkey
[email protected]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to