S
S
sofull2017-06-01 07:14:02
Java
sofull, 2017-06-01 07:14:02

The question is savedInstanceState how to save the array?

Good afternoon!
I programmatically assign text to buttons.
All assignments are stored in an array.
After turning the screen, the inscriptions disappear accordingly.
How can I save my array using savedInstanceState?
savedInstanceState.putStringArray ? Does anyone have an example?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Neonoviiwolf, 2017-06-01
@Neonoviiwolf

you have an array, store it separately, after the flip it is called by the oncreateview machine, there you check if the array is empty, if not, create all the buttons and fill it with data from the array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question