How to save a relative layout along with it's contents?

135 Views Asked by At

I have a relative layout to which I am adding ImageViews dynamically, and moving them around the layout, my problem is that I want to save the whole layout in it's current state in sdcard, so I can retrieve it later for editing. In what form should I store it and how?

What i have tried:

Save the layout to sdcard as an image, but image is not editable Try to read the layout.xml file through pullparser and DOM parser to get the dynamically added views, but that's not working

1

There are 1 best solutions below

2
On

You can read properties of all your ImageViews and store that in file. When you need to load it, just read those properties from file and add them to relative layout again.