You are getting arrays and ArrayList mixed up... ArrayList is dynamic and you can modify it at runtime. http://developer.android.com/reference/java/util/ArrayList.html
Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Jul 13, 2011 at 8:00 AM, Shruthi Varma <shruthi.tlis...@gmail.com>wrote: > Hi, > > You didn't get my point. > > After parsing that xml, I will get a number of magazines (images). > > I have to store all the images of each magazine in a separate ArrayList. > > If I know in advance that I will get 3 magazines, I can initialize 3 > ArrayList and store images in it as you said. > > But the number of magazines can change from time to time (in the server > side). > > So, how can I initialize "n" number of ArrayList where n is determined at > runtime. :( > > Regards, > Shruthi. > On Wed, Jul 13, 2011 at 6:41 PM, Durgadoss Ramanathan < > r.durgad...@gmail.com> wrote: > >> Hi Shruti, >> >> I do not clearly understand what you mean by "not usable at runtime" >> >> For example, >> >> In the Beginning, you initialize an ArrayList like this: >> >> ArrayList<String> mNames = new ArrayList<String>(); >> In your parsing code, as when you discover an item, you can do: >> >> mNames.add(item.toString()); >> >> I hope this helps you to an extent.. >> >> -- >> Regards >> Durgadoss >> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en