I would like to download just one image from an URL then save it (to my folder) . this image is user's avatar. I've found the following links:
我想从URL下载一个图像然后保存(到我的文件夹)。此图像是用户的头像。我找到了以下链接:
Best method to download image from url in Android
在Android中从url下载图像的最佳方法
Android Download Image From URL and show in Imageview
Android从URL下载图像并在Imageview中显示
how can I do ?
我能怎么做 ?
what is the best solution? (Except Download manager)
什么是最好的解决方案? (下载经理除外)
2 个解决方案
#1
3
The best way is use picasso library
最好的方法是使用毕加索图书馆
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
Its dead simple just put this one line where you want to load the image. Picasso supports image caching also so you doint have to worry about downloading and caching the image.
它的简单只是把这一行放在你想加载图像的地方。 Picasso也支持图像缓存,因此您不必担心下载和缓存图像。
#2
2
There are so many frameworks are available for this. Like
有很多框架可用于此。喜欢
- DownloadManager
- 下载管理器
- Picasso
- 毕加索
- AndroidQuery
- AndroidQuery
But I am using AndroidQuery since 3 years and have great experience with this framework.
但是我使用AndroidQuery已经3年了,并且对这个框架有很好的经验。
It cache the images it self and manage duplication of image download. And Really faster and light weight.
它自动缓存图像并管理图像下载的重复。并且真的更快,重量更轻。
You can download the jar from Here
你可以从这里下载jar
#1
3
The best way is use picasso library
最好的方法是使用毕加索图书馆
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
Its dead simple just put this one line where you want to load the image. Picasso supports image caching also so you doint have to worry about downloading and caching the image.
它的简单只是把这一行放在你想加载图像的地方。 Picasso也支持图像缓存,因此您不必担心下载和缓存图像。
#2
2
There are so many frameworks are available for this. Like
有很多框架可用于此。喜欢
- DownloadManager
- 下载管理器
- Picasso
- 毕加索
- AndroidQuery
- AndroidQuery
But I am using AndroidQuery since 3 years and have great experience with this framework.
但是我使用AndroidQuery已经3年了,并且对这个框架有很好的经验。
It cache the images it self and manage duplication of image download. And Really faster and light weight.
它自动缓存图像并管理图像下载的重复。并且真的更快,重量更轻。
You can download the jar from Here
你可以从这里下载jar