How to use drawable resource in custom XML?

by Robi » Thu, 10 Sep 2009 06:14:58 GMT

Sponsored Links
 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="" ;>
                <gallery title="@string/gallery01" 
                        <picture thumbnail="@drawable/pic_01">
                        <picture thumbnail="@drawable/pic_02">
                        <picture thumbnail="@drawable/pic_03">

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?


Other Threads

1. about get cid

hi all!
    Please tell me how to obtain cell id.

qq: 182378175


2. Live report from Shenzhen

Malang jauh ndro..



-----Original Message-----
From: "hendro gunawan" <>
Date: Wed, 28 Apr 2010 09:41:24 
To: Id Android<>
Subject: Re: [id-android] Live report from Shenzhen

Aku kok ditinggal?

Aku kan tim jeruk nipis...

*usap in*us di baju ompong*

sent using Google Superphone

-----Original Message-----
From: yopie suryadi <>
Date: Wed, 28 Apr 2010 16:38:00 
Subject: [id-android] Live report from Shenzhen

Mantep wifinya...
Sekalian mau tes email google bisa apa gak nih...
Kebetulan lagi disini,bareng sama team jeruknipis kita melakukan factory
visit ke Huawei....
Besok reportnya yah...hari ini leyeh2 dulu: p

sent from milestone

"Indonesian Android Community [id-android]" 

3. ask - U8230 MoDaCo tidak bisa A2SD

4. Can someone tell me why this is failing?

5. help! oprek G1 >.<

6. Permission Denial: writing

7. (ASK) Setelah App2sd di Spica 2.1, cara ngeceknya?