Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何Bitmap从网络(我的意思是在应用程序中!)添加到可绘制资源?所以我可以访问Bitmap使用R.drawable.bitmapName...
Bitmap
R.drawable.bitmapName
安装应用程序后,您将无法修改该文件夹。在这种情况下,您必须将位图复制到一个文件并从那里访问它。看看这个另一个问题:
将位图保存到位置
资源是在 apk 构建时编译的,因此您无法在运行时更改它。如果您想要一些标识符,您可以考虑创建一个共享首选项,您可以在其中将下载的图像文件与一些 id 关联起来。但是您需要付出一些努力才能实现该功能。