how to implement lazy loading with SQLite?
I have list of contacts in DB with the image path.
The circular head will load the image , from the db saved path.
Layout view
how to implement lazy loading with SQLite?
I have list of contacts in DB with the image path.
The circular head will load the image , from the db saved path.
Layout view
In this case, the easiest and safest way is to use Picasso open-source library from Square company. It provides all necessary features out-of-the-box. If you apply in your ListAdapter code snippet like this:
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
Then it will load images on your list in a lazy way. Instead of a web address, you can also use the path to the file located on the device. Asynchronous loading is handled by the library under the hood. Check out the documentation on their page: http://square.github.io/picasso/ and project on GitHub: https://github.com/square/picasso.