How to update arrays in res/values/array.xml by code?

偶尔善良 提交于 2020-01-06 21:00:28

问题


I can use

Resources res=this.getResources();
arr1=res.getStringArray(R.array.one);

to get the array and changed some of its values,

Then how can I save the new values back to the file of res/values/array.xml?


回答1:


You cannot "save the new values". Resources are read-only at runtime.



来源:https://stackoverflow.com/questions/7227549/how-to-update-arrays-in-res-values-array-xml-by-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!