-2

I m trying to show image from URL but while showing image when i touch the screen or want to scroll than it show app not responding.

What i do on my code:-

  1. Inflate four different-2 type of xml on main screen in which I'm showing images which comes from URL.Its works fine but problem is my above heading of question.

     _______________________
    |           |           |
    |           |           |
    |     1     |     2     |
    |           |           |
    |_______________________|
    |           |           |
    |           |           |
    |     3     |     4     |
    |           |           |    
     _______________________
     many more inflating layout
    

    In above 1 , 2 , 3 and 4 xml some stuff with imageview.

  2. I'm trying so many link or lib file which shown below :

    SmartImageView LazyLoader
    Universal Image Loader

    Above mentioned LIB file working fine when using Gallery or listview but not works fine on my case.

many more which available when im doing google...

Code:

for(int i=0;i<10;i++)
{
    // inflate one ofI'm trying so many link or lib file which shown below :- four type of xml and run below Asyntask
}

Asyntask in which shown image and using Universal Image Loader to display image on imageview

        @Override
        protected void onPostExecute(String result) {
            super.onPostExecute(result);
            ControlPage.imageLoader.init(ImageLoaderConfiguration.createDefault(act));
            ControlPage.imageLoader.displayImage(values_of_book,cover_image_book_link, options);


        }
    }

Above im using Universal Image Loader lib file for showing image and its works fine on gallery view or list view but not in my case.

image which occure while loading image from url and we can touch the screen

enter image description here

4

1 回答 1

0

如果资源已经下载,这些图像加载库通常不会加载相同的线程。这可能会冻结您的屏幕,强制异步加载这些屏幕,您将不会收到任何 ANR。

于 2013-07-19T20:04:41.183 回答