Android 即时写入 /res/drawable/?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3374061/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Write to /res/drawable/ on the fly?
提问by Cameron McBride
My widget reads an image from /res/drawable/
.
我的小部件从/res/drawable/
.
I would like to be able to change the image and write it back out to the /res/drawable/
structure.
我希望能够更改图像并将其写回/res/drawable/
结构。
Is this possible?
这可能吗?
回答by Randy Sugianto 'Yuku'
Everything in the apk will be read only. And it's even better: android doesn't extract the apk when you install a program, so the size consumed is kept to minimal.
apk 中的所有内容都是只读的。更好的是:当您安装程序时,android 不会提取 apk,因此消耗的大小保持在最小。
回答by Romain Guy
You cannot write to res/drawable.
您不能写入 res/drawable。
回答by Aviendha
Nope. But you can change your program to use alternate forms of storage.
不。但是您可以更改您的程序以使用替代形式的存储。
http://developer.android.com/guide/topics/data/data-storage.html
http://developer.android.com/guide/topics/data/data-storage.html