I'm assuming you use Resources.getStringArray to read the array?

On Sep 14, 8:27 pm, nextgen <[email protected]> wrote:
> Well, by reading I assume you mean making use of these entries in the
> array?  That happens far downstream of where the app is closing itself
> (before onCreate() finishes).  But if it helps, I have the following
> set up to parse out a particular piece of data:
>
> private String ParseScoreData(Integer position, Integer ElementNeeded)
>     {
>         String tmpstr = TEAM_SCORES[position];
>         return tmpstr.substring(tmpstr.indexOf("[" +
> String.valueOf(ElementNeeded) + "]")+3, tmpstr.indexOf("[" +
> String.valueOf(ElementNeeded+1) + "]"));
>     }
>
> On Sep 14, 9:21 pm, DanH <[email protected]> wrote:
>
> > And how are you reading these?
>
> > On Sep 14, 8:10 pm, nextgen <[email protected]> wrote:
>
> > > Here is the line where I load the XML into the Array:
>
> > > TEAM_SCORES = getResources().getStringArray(R.array.TEAM_SCORES)
>
> > > Here is a clip of the XML for TEAM_SCORES:
>
> > > <string-array name="TEAM_SCORES">
> > > <item>[1]sd[2]77[3]w1...@kc[5]san Diego Chargers[6]R01[7]Mon Sep 13,
> > > 10:15 PM[8]</item>
> > > <item>[1]ari[2]69[3]w1...@stl[5]arizona Cardinals[6]R02[7]Sun Sep 12,
> > > 4:15 PM[8]</item>
> > > ...
> > > </string-array>
>
> > > Only instead of two items, there are 512.  When I cut it down to, say,
> > > the first 32, everything is fine.  The file size of strings.xml on
> > > disk is 44k, which doesn't necessarily sound that large to me.  Maybe
> > > it's choking on a certain entry later on in the list?
>
> > > On Sep 14, 9:04 pm, DanH <[email protected]> wrote:
>
> > > > Maybe you could give us a sample of what you're "loading".
>
> > > > On Sep 14, 7:44 pm, nextgen <[email protected]> wrote:
>
> > > > > Thank you both for the replies. Unfortunately you are stretching my
> > > > > admittedly thin knowledge, only began in Android and Java a month
> > > > > ago.  I'll look into LogCat.  Frank, if you can spare a bit more of
> > > > > your time to explain how to do this at compile time I would be
> > > > > grateful, although I'm sure it's pretty remedial for you.
>
> > > > > On Sep 14, 5:14 pm, Frank Weiss <[email protected]> wrote:
>
> > > > > > It's running out of time in onCreate() or running out of memory. If 
> > > > > > the XML
> > > > > > data is known at compile time, why bother parsing it at run time?
> > > > > > Any messages in LogCat?- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

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