M
M
max_vr2016-05-25 14:15:17
Android
max_vr, 2016-05-25 14:15:17

Is it possible to manipulate string.xml programmatically?

I just recently started to master android, do not judge strictly. There was such question: whether it is possible to use string.xml for storage of string simple resources? Let's say there is an input field and a button, there is an empty ArrayList in string.xml. Is it possible to make it so that after pressing the button, the content of the input field is stored in this arrayList, and it can be obtained after restarting the application? If so, is it possible then to selectively remove elements from the array?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan, 2016-05-25
@LenLord

No. This is impossible.
https://developer.android.com/reference/android/co... - learn
either other ways to store data (SQLite etc)

V
VitGun, 2016-05-25
@VitGun

string resources and string.xml are meant for something a little different. Try to write ArrayList to any other xml file.

I
Ilya Pavlovsky, 2016-05-26
@TranE91

1) SharedPreferences
2) Database
3) File

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question