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..
No,Its not possible.
To set xml file as layout in your activity you have that file in res/layout
directory and also make sure its id entry in R.java
files.
Without keeping it in res/layout
you can't apply it as a layout to your activity.
EDIT:
Basically when you put any xml layout
file in res/layout
then its id entry created in public static final class layout
in R.java
files, And from there when you set that file as a contentView()
of your activity or inflate
it, the android nutshell make a view from that raw layout xml file and apply it to your activity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With