SQLite中存储BLOB图片 [英] storing blob images in sqlite

查看:640
本文介绍了SQLite中存储BLOB图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在sqlite的存储一个图像不是做一个适当的方式。我可以存储图像如的位置。(资产/ facea.png)等等......所以,当我从获取的SQLite数据库中的数据,我得到的位置(资产/ facea.png)。从这里请指导我如何链接(资产/ facea.png)位置转换为图像时,我提交。我的EditText包含像喜资产/ facea.png值我怎样才能改变这种喜<图像方式> 上点击提交

Storing a image in sqlite is not a proper way to do. Can I store the location of the image eg.(asset/facea.png) and so on... So when I fetch the data from sqlite DB I get the location(asset/facea.png). From here please guide me how to convert the link (asset/facea.png) location to image when I submit it. My edittext contains value like "hi asset/facea.png" how can I change that to hi <image> on click submit.

我的样本code: http://pastebin.com/xzPBKK2L

先谢谢了。

推荐答案

它的一个坏主意,把图像资产的文件夹(放绘制),morever如果你把APK(资源)的图像则可能是应用程序的机会尺寸变大(可能以MB为单位)。所以我只是建议你把服务器映像,并从该只需要下载并查看 <强> LAZYLIST (高速缓存),也指的 this

it an bad idea to put image in asset folder (put in drawable), morever if you put image in apk(resource) then there might be chance of application size become large(may be in MBs). so i just advice you to put image on server and just download from that and view with the concept of LAZYLIST(cache) and can refer also this

这篇关于SQLite中存储BLOB图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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