I see a lot of android applications just look like html pages, containing many images here and there. But I don't know usually how these applications get their images to render. Do they get images through url. I found some posts on the internet suggested to use AsyncTask to download image through a HttpURLConnection . But I think AsyncTask is a little bit too complicated which involves too much code. Can anyone recommend me a simple,brief and may be also standard approach to get images to render in android applications?Any help is much appreciated!
2
- you can use glide github.com/bumptech/glide as it will take care of all the memory management for you and because it's a quite light weight library.Haris ali– Haris ali2017-04-30 19:01:50 +00:00Commented Apr 30, 2017 at 19:01
- Thank you. Ajinkya S also recommended it. I am going to check it out.user1870797– user18707972017-04-30 19:08:15 +00:00Commented Apr 30, 2017 at 19:08
Add a comment |
2 Answers
Use an image loading library, like Glide (https://github.com/bumptech/glide), Picasso (http://square.github.io/picasso/) or Fresco (https://github.com/facebook/fresco) among others.
1 Comment
user1870797
Thank you. These libs are exactly what I am looking for. They all look great.
I will suggest using glide as it is lightweight and easy to use.
And also has its own many features.
3 Comments
user1870797
Thanks for you suggestion. Its really hard to choose one out of them because they all offer similar functions and look great. The lightweight and easy to use matter a lot to me but the other two libs also get many high ratings. I think I need some extra time to make more comparison.
Ajinkya S
There is no memory leakage issue in glide
user1870797
Thank you. Finally I decide to join glide as long as it works for my need.