Monday, November 11, 2013

Lazy Loading Image Download in android

Hello Friends!

Today I have share the knowledge about the lazy loading image download from the internet in android.
The images will downloaded very fast with the help of the multiple thread.

Images that are not visible on the initial page load are not loaded or downloaded until they come into the main viewing area. Once an image comes into view it is then downloaded and faded into visibility. Scroll down this page to see the action for same.

For this i am using the open source library universal image loader made by nostra. Here you can download the universal image loader library Here.

 

MainActivity.java


CustomAdapter.java



ImageListActivity.java


activity_main.xml


imagelist.xml


item_list_row.xml


 

 


5 comments:

  1. nice tutorials,this is very helped for me...keep it more examples

    ReplyDelete
  2. thank u so much ankit its run!!!! oh my God you are genius thank u so much!!!!!!!!!!!!!!!!!!!!!!

    ReplyDelete
  3. What does this line do: intent.putExtra("stringarrayimage", Constants.IMAGES);? And how could i use it in C#?

    ReplyDelete
  4. if just blindly start an asynchronous operation on every getView() call while scrolling, you’d be wasting a lot of resources as most of the results would be discarded due to rows being recycled very often.

    Need Interaction awareness to your ListView adapter so that it doesn’t trigger any asynchronous operation per row after, say, a fling gesture on the ListView—which means that the scrolling is so fast that it doesn’t make sense to even start any asynchronous operation.

    Please help on this.

    ReplyDelete

Mastering Jetpack Compose: Key Methods for Efficient Android UI Development

Jetpack Compose is a modern toolkit for building native Android UI. It simplifies UI development by providing a declarative approach, making...