Re: [android-developers] Re: While Loop Stall the rest of the program

2010-09-27 Thread Nam Ngo
Hello ArcDroid, From my experience, the design concept should be as follow: We will have 2 threads: Main Thread will provide a call back for Image Thread to set image to ImageView. Image Thread will download/ load the bitmap, then use the call back to set Bitmap to ImageView. The call back can

[android-developers] Re: While Loop Stall the rest of the program

2010-09-27 Thread Clover
Hello ArcDroid, From my experience, the design concept should be as follow: We will have 2 threads: Main Thread will provide a call back for Image Thread to set image to ImageView. Image Thread will download/ load the bitmap, then use the call back to set Bitmap to ImageView. The call back can

[android-developers] Re: While Loop Stall the rest of the program

2010-09-26 Thread Kumar Bibek
Ummm, you should mention more details, as to what and how you are doing things. Else, no one can answer your query. -Kumar Bibek http://techdroid.kbeanie.com On Sep 26, 12:45 pm, ArcDroid jacobrjohn...@gmail.com wrote: Hello, I am trying to load a picture, then run a while loop.  The problem

[android-developers] Re: While Loop Stall the rest of the program

2010-09-26 Thread ArcDroid
the first picture never loads with the while loop. Once the loop is removed the first picture loads just fine. right now it doesn't load the first pic, but will show the second after 5 seconds. Thanks //start with picture 1 main.setImageResource(R.drawable.pic1); //after 5 seconds load another

[android-developers] Re: While Loop Stall the rest of the program

2010-09-26 Thread ArcDroid
I originally tried a separate thread, but couldn't update the ImageView from my new thread. On Sep 26, 1:23 am, ArcDroid jacobrjohn...@gmail.com wrote: the first picture never loads with the while loop.  Once the loop is removed the first picture loads just fine.  right now it doesn't load the

Re: [android-developers] Re: While Loop Stall the rest of the program

2010-09-26 Thread YuviDroid
The View gets updated only after your method is done executing. So, when you call setImageResource() the view is not immediately updated. You should use a separate thread for your for loop, and I can think of 2 options right now: 1. Use a Thread and a Handler to update the UI (