开发者

How to Update an Xml File Android?

I have a layout where users can add buttons and place them where they want. I want to allow the user to save their layout so that it is loaded t开发者_开发知识库he next time they open the app. so can i save the updated xml file ?


you will need to Create layout at rumTime , because you can't edit anything into your xml . all you have is its resource reference R.layout.layout_name ;

So after creating layout RumTime , let your user redesign it....and save new coordinates/settings into persistent storage like shared preference or database/file . when later you when need updated layout pick these settings up and use them .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜