ImageView, like all subclass of View, cannot be called from any thread  
other than the UI thread.

That said, what is the update you are try to do?

On Oct 28, 2008, at 10:24 AM, Mark Hansen wrote:


Opps.. I start the Runnable with the following:

mHandler.post(mUpdateTimeTask);

forgot to add that..

On Oct 28, 10:12 am, Mark Hansen <[EMAIL PROTECTED]> wrote:
> Some more info:
>
> I declared a handler in my class:
>
> private Handler mHandler = new Handler();
>
> Then added my runnable
>
> private Runnable mUpdateTimeTask = new Runnable() {
>                    public void run() {
>                     updateDisplay.sendEmptyMessage(0);
>                    }
>                 };
>
> and have a handler that does my update...
>
>         private Handler updateDisplay = new Handler() {
>                 public void handleMessage(Message msg) {
>                         // ImageView update is here...
>                 }
>         };
>
> The image views are still not updating from what I can tell until the
> rest of the activity completes.
>
> I've tried variations implementing runnable and spawning threads
> (which works well with progress dialogs) and still can't get it to
> work.
>
> Basically I want to quickly change some ImageViews almost like an
> animation or a clock in with an activity.. is there a better method of
> doing this?
>
> Thanks,
> Mark
>
> On Oct 27, 5:44 pm, Mark Hansen <[EMAIL PROTECTED]> wrote:
>
>> I have some image views I'd like to update as somethings change in a
>> function in an activity.
>
>> I can't seem to get them to refresh, at least not in away that  
>> appears
>> visible on the phone.
>
>> I've tried running them in a seperate thread, and even from that
>> thread using a custom handler to do the image update, but still no
>> dice.
>
>> Anyone have any tips for doing this?
>
>



--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to