Is there a way to load an XML Layout without the R class?
And if possible to load it from a string?
Is there a way to load an XML Layout without the R class? And
Share
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.
Yes, eg if you want to load a xml from the web and inflate it to ViewGroup.
Use
(LayoutInflater) mInflater = LayoutInflater.from(context);and inflate from a xml:
you will be able to load the xml from the web by performing a webrequest and use the DocumentBuilder