tags:

views:

15

answers:

1

Hi guys, i have an android application which has an imageview object in main thread. i called a method fron another thread to set the bitmap of imageview. it shows an exception "calledFromWrongthreadException" anybody please help with some hints

A: 

You have to run this method on your UI thread, e.g. via a Handler. The absolutely best way is to create and execute an AsyncTask and run the method in onPostExecute(). A good introduction can be found here: http://android-developers.blogspot.com/2009/05/painless-threading.html

mreichelt