Reputation: 4259
I have an activity that lets users add textviews. Click a button, a new textview is created, they can change the text or delete it. They can add up to 10 textviews.
I would like to be able to save these dynamically created layouts, preserving the newly created textviews and their text, so they can be loaded on command. How might I do that?
Upvotes: 2
Views: 379
Reputation: 43098
You can iterate through views of your layout using getChildAt(int index) and getChildCount() and save them to some xml format in order to restore them later.
Upvotes: 1