I am working on an application in Android in which I need to design the layout of the application dynamically. I have to get the details of the layout from the database via XML and show the parse results on the screen as per the requirement开发者_开发问答. For example, XML will have the number of TextView and Buttons which will be included in the UI.
Can someone please suggest me the possible approach to implement this in Android SDK?
Thanks in Advance, Aagrah
You can create the layout on the fly in Android. Create a Linear/RelativeLayout, then add TextViews and Buttons programatically into it.
See this answer on how to add item programatically.
精彩评论