This might be a silly question, but I would like to generate a layout xml file for android on the server, and when the user presses a button, the xml file is loaded into the android app.
Is this possible at all?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I do not think it is possible. The layout inflator documentation is here:
From the documentation the constructor:
states:
Why not just create the xml for the views and build them into the application? That is how Android Apps are typically done. If you want to support totally dynamically generated screens then it is going to be a lot of work. You could do it by developing your own layout sytax, and creating a view that knows how to dynamically render a view from that syntax. Essentially you would need to reinvent the layout inflator thats built into the OS.