Eliezer Eliezer - 11 months ago 129
Android Question

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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download