[英]Efficient Way to store images in android
My application requires that when a snapshot is taken it must store in memory and next time when I restart the phone I must get a thumbnail of that photo in list of photos and the full scale photo when I click on it. 我的应用程序要求拍摄快照时,快照必须存储在内存中,下次启动手机时,单击照片时,必须在照片列表中获得该照片的缩略图以及完整照片。
There are 2 ways I know. 我知道2种方法。
Which is more efficient ? 哪个更有效?
Definitely store the images directly as opposed to in XML. 绝对直接存储图像,而不是XML。 It will take time to read the image from the file system but I wouldn't worry about this taking an excessively long time.
从文件系统读取图像将花费一些时间,但是我不必担心这会花费很长时间。
Read through the android docs on Data Storage for more info: http://d.android.com/guide/topics/data/data-storage.html 阅读有关数据存储的android文档以了解更多信息: http : //d.android.com/guide/topics/data/data-storage.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.