2012/8/16 b0b <pujos.mich...@gmail.com>

>
>> It seems that inflating views just isn't very fast, even with the binary
>> XML format and stuff.
>>
>>
> Yes it can be very slow for complex layouts.
>

I wouldn't consider 8-10 views, times 7-8 list view items very complex.


>
> It is unfortunate that it is not safe to invoke the layout inflater  in a
> thread to preload the layout while displaying a loading screen ,
>

I suppose one could preload some views in advance on the UI thread, taking
10-15 ms here and there when noone's looking... but it's kind of unpleasant
to manage and wouldn't work in your case with the initial onCreate....


> to avoid the "black screen" effect while the app is busy in onCreate()
> loading the layout.
>

I'm not getting the black screen, but the 150-200 ms is very noticeable
(the db query behind the list view runs on a worker thread and takes 10-20
ms -- these times are from when I update the adapter to when the list view
is done with its layout).

... except, well, on my app's initial screen when posting a dialog (the
changelog after a version update), which is kind of unpleasant too, will
need to look at that.

-- K

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

Reply via email to