gpt4 book ai didi

android - 从 URL 下载图像并将其保存在我的应用程序的 drawable-hdpi 文件夹中

转载 作者:太空狗 更新时间:2023-10-29 16:36:56 25 4
gpt4 key购买 nike

我需要从 url 下载图像并将其保存在应用程序的 drawable-hdpi 文件夹中,然后在 ImageView 中显示它。我该怎么做?

我尝试使用 thisthis代码,但这对我来说不是一个好的解决方案,因为这段代码保存在 SDCard 上。

最佳答案

您不能保存在应用程序包中。您只有这些选项:

Your data storage options are the following:

Shared Preferences Store private primitive data in key-value pairs. Internal Storage Store private data on the device memory. External Storage Store public data on the shared external storage. SQLite Databases Store structured data in a private database. Network Connection Store data on the web with your own network server.

更多信息:http://developer.android.com/guide/topics/data/data-storage.html

关于android - 从 URL 下载图像并将其保存在我的应用程序的 drawable-hdpi 文件夹中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26338841/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com