On Sat, Dec 3, 2011 at 6:32 PM, TreKing <[email protected]> wrote:

> On Tue, Nov 29, 2011 at 9:20 AM, Adam M <[email protected]> wrote:
>
>> Would anyone be able to point me in the right direction, or give me any
>> pointers?
>>
>
> Unless I've misread your question, defining layouts via XML is pretty much
> exactly how you are supposed to create layouts in Android and how it works.
> Have you read the documentation which explains these concepts?
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>

 That's mostly right, but he's not asking about using xml during *compile
time* he's asking about it during *runtime*.

For example, he might download a .xml file and then want to use that as his
content view.

It doesn't work like this, you have a resource ID that is generated, and
then you pass this, you can't just pass in random xml that will be parsed.

So, basically, no, you can't do this this way.

However, you can add UI objects on the fly to your content views.

Why do you have to do this again?  It sounds like you probably just want to
programmatically add a number of TextViews on the fly anyway.

kris

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

Reply via email to