Android - 如何下载图像并将其用作新资源? [英] Android - How to download an image and use it as new resource?

查看:21
本文介绍了Android - 如何下载图像并将其用作新资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从远程服务器下载图像并将其用作资源.是否可以 ?我该怎么做?

I want to download image from distant server and use it as resource. Is it possible ? How can I do this ?

推荐答案

是的,您不能将其作为资源文件下载..您可以将图像下载并存储在您的 SDCard 或数据库中,然后从那里加载...

Yes you cannot download it as a resource file..you can download and store images on your SDCard or database and load it from there...

要检查如何将图像下载到 SDCard,请参阅此链接

To check how to download images to SDCard refer to this link

http://snippets.dzone.com/posts/show/8685#related

您以后可以像这样从您的 SDCard 加载它

You can later load it from your SDCard like this

http://android-er.blogspot.com/2010/01/how-to-display-jpg-in-sdcard-on.html

这是您从数据库中存储和检索图像的方式

This is how you store and retrieve images from ur DB

http://www.helloandroid.com/tutorials/store-imagesfiles-database

这篇关于Android - 如何下载图像并将其用作新资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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