*> I have to pass array to a ListView activity??*

Are you asking how to do this or if you have to do it this way?


You have to have an instance of the Context class, because that class has
the getResources() method.  Any Activity and any service inherits from
Context so they ARE instances of Context.

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Wed, Nov 11, 2009 at 3:51 PM, android <[email protected]> wrote:

>
> I have to pass array to a ListView activity??
>
> On 7 Nov, 21:26, PJ <[email protected]> wrote:
> > By the way, I'm assuming that thisXMLfile is actually a resource,
> > i.e. a staticXMLfile under your project's res/values/ folder, whose
> > contents are fixed at installation time.
> >
> > If my assumption is wrong, then it's not a resource, and you should
> > change the name from "resources" to something else to prevent
> > confusion.  (And yes, you would have to dynamically read anXMLfile
> > using anXMLlibrary in that case.)
> >
> > -- PJ
> >
> > On Nov 1, 5:46 am, Mats <[email protected]> wrote:
> >
> > > Hello, I'm still a beginner with android (and also with Java a Little
> > > bit) and i have a problem
> >
> > > i have andXMLdocument in values with anarrayin it:
> >
> > > <?xmlversion="1.0" encoding="utf-8"?>
> > > <resources>
> > >     <string-arrayname="groups">
> > >                 <item>-</item>
> > >                 <item>AP_KEU1-1</item>
> > >                 <item>AP_KEU1-2</item>
> > >                 <item>AP_KEU1-3</item>
> > >                 <item>AP_KEU1-4</item>
> > >                 <item>AP_KEU1-5</item>
> > >                 <item>AP_KEU1-6</item>
> > >                 <item>ATE-ORG1</item>
> > >                 <item>ATr1a</item>
> > >                 ......
> > >     </string-array>
> > > </resources>
> >
> > > how do i get this in anarraythat i can use like this in the program:
> >
> > > group[0] = "-"
> > > group[1] = "AP_KEU1-1"
> > > group[2] = "AP_KEU1-2"
> > > group[3] = "AP_KEU1-3"
> > > group[4] = "AP_KEU1-4"
> > > group[5] = "AP_KEU1-5"
> > > group[6] = "AP_KEU1-6"
> > > .....
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en

Reply via email to