What about getAttributeResourceValue()?  I haven't tried this method, but 
from the docs it appears that it should work.

For others (and to note what I just learned today), you can use 
Resources.getXml to get an XmlResourceParser for your custom xml files (in 
res/xml/) and in addition to XmlPullParser, this interface also extends 
AttributeSet, which provides useful resource related methods like the above.

pb
----
Open Source Android App Developer
Dining Out (with friends) - The History and Future of Your 
Food<https://play.google.com/store/apps/details?id=net.sf.diningout> 


On Thursday, 10 September 2009 00:12:33 UTC+2, Robi wrote:
>
> Hey guys, 
>
> so I have an XML file: xml/catalog.xml 
> which contains gallery and pictures. 
>
> Like this: 
>
> <?xml version="1.0" encoding="utf-8" standalone="yes"?> 
>         <catalog xmlns:myres="http://schemas.android.com/apk/res/android";> 
>
>                 <gallery title="@string/gallery01" 
> thumbnail="@drawable/t_gallery1"> 
>                         <picture thumbnail="@drawable/pic_01"> 
>                         </picture> 
>                         <picture thumbnail="@drawable/pic_02"> 
>                         </picture> 
>                         <picture thumbnail="@drawable/pic_03"> 
>                         </picture> 
>                 </gallery> 
>         </catalog> 
>
> In my view I can extract the attribute values using getAttributeValue 
> () in XmlPullParser, and the result is a string. 
> But could I somehow get the drawable resource right away? (That's why 
> I put the @ in the beginning) 
>
> getAttributeNameResource() gives null so that ain't good. 
>
> Any ideas? 
>

-- 
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