Inflation only works with an XML file that has been processed by aapt into
the binary resource representation.

2009/9/14 Dmitry.Skiba <dmitry.sk...@gmail.com>

>
> Hm, at a first glance this is possible: several LayoutInflater.inflate
> methods accept XmlPullParser, and you can certanly create one for an
> arbitrary Reader.
>
> Dmitry
>
> On 15 сен, 06:48, Argy <akri...@gmail.com> wrote:
> > I'm just wondering if I'm able to create a View from an external XML
> > source.
> > As I was reading, you must place the XML layout inside the res/layout
> > and when you compile it, you can load the layout by typing
> > setContentView(R.layouts.my_layout).
> > What if I have this XML layout online (on a website) and I want to
> > create the layout on runtime?
> > Is there any way to do this?
> > Or I have to parse the XML and create the layout (hard-coded)?
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to