I have a layout where users can add buttons and place them wherever they want. I want to allow the user to save their layout so that it loads the next time the application is opened. Does anyone know if I can save the file to an SD card? Alternatively, I could use some kind of layout.getXml () method and put it in the database used by my application. thanks in advance
There is no file to save when you create the layout through code. You will need to create your own file format, which can be saved on an SD card or inserted into a database.
You can use the savedInstaceState () method with the same type as the parameter. there load the ui you want during reboot. The onCreate () method sets the condition that saveInstaceState obj is null or not. if not, call LoadUI ().
, , . JSONWriter. , JSONObjects.