简体   繁体   English

从Web服务在Android中存储图像

[英]Storing Images in android from web services

I am able to handle images and text from web URL's in android using AsyncTask, but have a separate question in mind. 我可以使用AsyncTask处理来自android中Web URL的图像和文本,但请牢记一个单独的问题。

Which approach is best suited for storing pictures for one time loading? 哪种方法最适合一次加载存储图片

IE: Either in an SD Card or in SQLite DB. IE:在SD卡中或在SQLite DB中。

If you want to store images for just one time loading, you don't need to store it in Sdcard. 如果您只想存储一次加载的图像,则无需将其存储在Sdcard中。 You better use a library like Glide or Picasso . 您最好使用GlidePicasso之类的库。 It does all the hard work of caching and managing memory for you. 它为您完成了缓存和管理内存的所有艰苦工作。 It has very simple API. 它具有非常简单的API。

    Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM