I am working on App, in which i have 3 imageview and i want to do these imagesviews changes in loop continuously.
Asked
Active
Viewed 61 times
0
-
Question is not clear, redefine your problem. btw No need of `runOnUIThread` in `onPreExecute()` since, `onPreExecute()` itself runs on ui thread. – Gaurav Gupta May 09 '14 at 06:34
-
If i understand your problem correctly, then you want to make something like loading screen. – Gaurav Gupta May 09 '14 at 06:46
2 Answers
1
onPostExecute() and onPreExecute() are running on UI thread already. For communicating in Background you could use onProgressUpdate or send Handler messages to ImageView to safely communicate.
Here is good example of Lars Vogel http://www.vogella.com/tutorials/AndroidBackgroundProcessing/article.html

user----
- 65
- 1
- 6
0
I think what you can do is, in doInBackground()
you need to call publishProgress()
that will result in a callback to onProgrssUpdate()
, In onProgressUpdate()
, you can make the currentlyVisible imageView to invisible and make next imageView visible.

Gaurav Gupta
- 4,586
- 4
- 39
- 72