How do I add new item to arraylist without overwriting the previous one ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How do I add new item to arraylist without overwriting the previous one ?

I am trying to save string to ArrayList in sharedpreferences android. Each time new value gets added previous one is not available. How do I solve it ?

7th Jun 2019, 12:37 PM
Ghost rider
2 Respostas
+ 2
Load the old values in a list. Add the new values to that list. Save the resulting list.
7th Jun 2019, 1:10 PM
kumesana
0
Thanks. Did that.. saved to string builder.
8th Jun 2019, 2:23 AM
Ghost rider