In Android Studio I have defined a string array as follows in strings.xml
:
<string-array name="item_codes">
<item>FRE</item>
<item>PAR</item>
<item>PC</item>
<item>SUN</item>
<item>CTRL</item>
</string-array>
When the user runs the app, I would like to be able to add new elements to this array so that all elements are saved for when the user next opens the app.
So:
1) Is there a way in Android Studio to add a new <item>
to <string-array>
while the app is running?
2) Alternatively, is there another way to save array elements so they can be accessed again upon restarting the app?
Thanks in advance for any help!