我可以更新由code中的绘制目录中的形象? [英] Can I update an image in the drawable directory from code?
问题描述
我在res图片/绘制目录:RES /绘制/ picture.jpeg
。我可以动态更新从code此picture.jpeg?即我想用另一张照片到动态替换这幅画在绘制目录。
如果可以,我应该用访问图片路径是什么?我应该使用RES /绘制/ picture.jpeg?
感谢。
我可以动态地更新这个
从code picture.jpeg?
块引用>没有。资源是签名的APK文件的一部分,在运行时无法通过航运的最新APK给用户进行修改,除了
I have a picture in res/drawable directory: res/drawable/picture.jpeg.
Can I dynamically update this picture.jpeg from code? i.e. I want to use another picture to replace this picture in the drawable directory dynamically.
If I can, what path should I use to access the picture? Should I use "res/drawable/picture.jpeg"?
Thanks.
解决方案Can I dynamically update this picture.jpeg from code?
No. Resources are part of the signed APK file and cannot be modified at runtime, other than by shipping an updated APK to your users.
这篇关于我可以更新由code中的绘制目录中的形象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!