Friday, October 1, 2010

[android-developers] Lazy view inflation?

My app allows the user to select different layouts for the main
activity a la:

switch(mUserInterfaceLayoutOption)
{
case 0: setContentView(R.layout.main2); break;
case 1: setContentView(R.layout.main); break;
default: setContentView(R.layout.main2); break;
}

Are both layouts inflated before any of this code is executed, or are
layouts inflated by setContentView on demand? I'd like to provide more
optional layouts, but I'm concerned that if views are not lazily
inflated, my app startup time will suffer.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate