On Sun, Jul 24, 2011 at 10:23 PM, elDoudou
<[email protected]> wrote:
> I'm sorry, but your answer does not answer my requirements, and as I
> stated, having to insert a line of code referring a static method
> every where I need to make sure my application is initialized is for a
> poor design, because I have something like 100 Activity classes in my
> application (yes, this is a very big application), and I cannot
> prevent from forgetting to insert the piece of code somewhere.

Use lazy initialization, and your problem cannot happen, by definition:

http://en.wikipedia.org/wiki/Lazy_initialization

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

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