Android Dynamically Add Item to Array XML Resource
问题 Is there any way I can add items in code to a String-Array resource? For instance, if I want to create a spinner that shows the user values, and I want to allow the user to add their own custom values. 回答1: No. this is not supported because resources are packaged in the binary .apk and as such cannot be changed. Don't follow this design pattern, change your approach. 回答2: probably JoxTraex has no idea on android framework or as they are saying: when someone says this can't be done - there