Problem loading image from web (android)?

You are trying to Download a File from the UI Thread...(which is why your UI Freezes) Use a Seperate Thread or AsyncTask so that your UI doesn't Freeze up This should solve your problem.

You are trying to Download a File from the UI Thread...(which is why your UI Freezes) Use a Seperate Thread or AsyncTask so that your UI doesn't Freeze up. This should solve your problem.

Ok, Ive tried with the first answer in this thread: stackoverflow. Com/questions/3090650/…, but the "DownloadImageTask"-part of "new DownloadImageTask. Execute(mChart);" gets red in eclipse, even though the class is created.

Did I miss something? – Johan Jan 12 at 12:45 Oh never mind, missed "()" after the class. – Johan Jan 12 at 12:58.

As st0le has pointed out you are trying to do the heavy duty stuff from the UI thread. All heavy-duty stuff in Android should be done on other worker thread. Because doing it in main thread (or the UI thread) can make your application unresponsive and may be killed as the system is persuaded to think that it has hung.So you have to do the long running operations in separate thread.

For implementing this you can use the concept of Handlers.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions