In my application i want to get layout file from server and set that file as content view of activity.I want to know whether it is possible..For this what i had in mind is I’ll download file from server and will store it in SD card and will access it from there.But is it possible to set the file as content view..Please help me..
Share
No,Its not possible.
To set xml file as layout in your activity you have that file in
res/layoutdirectory and also make sure its id entry inR.javafiles.Without keeping it in
res/layoutyou can’t apply it as a layout to your activity.EDIT:
Basically when you put any
xml layoutfile inres/layoutthen its id entry created inpublic static final class layoutinR.javafiles, And from there when you set that file as acontentView()of your activity orinflateit, the android nutshell make a view from that raw layout xml file and apply it to your activity.