that's right, remember the async task isn“t a gui thread and you have to
change the image view data with a handler (android.os.Handler), from the
async task send a message to the handler, and the handler will update the
view  ;)

---------- Forwarded message ----------
From: Jherry <[email protected]>
Date: 2010/11/23
Subject: [android-developers] Re: Calling ImageSwitcher.setImageURI() in a
thread
To: Android Developers <[email protected]>


I found out. In fact the thread is not a GUI thread and that's why the
view is not updated.
To make it work I created an AsyncTask which is made for download
stuff but can be used for this kind of need.

Thanks!

On 21 nov, 13:08, Jherry <[email protected]> wrote:
> Hi,
>
> I want to display pictures into an ImageSwitcher and change image
> every 3 seconds. I instanciate a Thread that call thesetImageURI(URI)
> and I schedule it every 3 seconds. It does not update the view and I
> don't know how to do it. If I call the same code that call
thesetImageURI() from the OnClickListener of the view it works!
> Do you know why and how can I make it work?
>
> Thank you.

--
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]<android-developers%[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

Reply via email to