高效的方式来存储在机器人图像 [英] Efficient Way to store images in android

查看:137
本文介绍了高效的方式来存储在机器人图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序需要时,采取的快照,必须在内存中,并在下一次存储,当我重新启动手机,我必须获得该照片在照片列表,当我点击它的全尺寸照片的缩略图。

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.

有2种方式,我知道。

There are 2 ways I know.

  1. 直接将图像存储。值得关注的是这里每次有时间打目录得到的图像,需要一定的时间。
  2. 存储在一个XML的所有图像。值得关注的这里是将XML太大,需要时间来解析

这是更有效?

推荐答案

绝对直接存储的图像,在XML反对。这将需要时间来阅读从文件系统的形象,但我不会担心这个服用时间过长。

Definitely store the images directly as opposed to in 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.

读通过数据存储在Android文档的详细信息: HTTP: //d.android.com/guide/topics/data/data-storage.html

Read through the android docs on Data Storage for more info: http://d.android.com/guide/topics/data/data-storage.html

这篇关于高效的方式来存储在机器人图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆