سؤال

I am creating an android application in which I am parsing so much XML data (XML data comes from a server) which contains Strings and image url's also.I need to use this data in many part of application. So for saving all these data I have used ArrayList and HashMap.I have declared ArrayList's and HashMap's variables in a single class as public static variables so I can access this data through a single class whenever I need.

And for images I have created ArrayList and placed in same single class same as other data(public static).Once I download a image through image url's I save those image drawables to these ArrayList variables so whenever I need any image again so I use these variables to get it.

Now my doubt is whether this approach is right or not. Please suggest me the right way.

Thank you

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top