Since the views are all different sizes, the various ListViews,
GridViews, and Adapters don't work. Part of the secret sauce of my app
is the algorithm for arranging the views in the most compact way to
present the maximum amount of information in the screen space
available. The main benefit of the Android framework for me is that it
handles (horizontal and vertical) scrolling very nicely even when some
of the views need to be "pinned" (non-scrolling) and even for 1000
views of different sizes and shapes. But for that to happen, all the
views need to be there in the hierarchy, not just those on the
immediately visible screen.

But more to the point, the whole thing is working beautifully without
consuming undue heap or stack space. The _only_ issue is that it takes
about 3 seconds to build the view hierarchy in the most extreme cases
and I need to let the user know work is being done.

So back to the issue at hand. It sounds like Romain is suggesting that
I call showDialog and then have the handler post some work to the
queue. What if I just put all 3 seconds of work in that one post? I
can live with the progress dialog frozen for a few seconds as long as
it gets on the screen before the posted work arrives. Can I be sure
the dialog will get on the screen before the post hits? If not, what
do you think is the best way to slice up the 3 seconds of work, maybe
using postDelayed and do some work every 50 mS or so? What if I'm
running on a slow (or otherwise busy) platform and the 50 mS slices
get completely consumed by the drawing work such that the UI thread
can't get the dialog up?

On Nov 6, 1:11 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Sat, Nov 6, 2010 at 4:08 PM, Romain Guy <romain...@android.com> wrote:
> > Have you thought about using a ListView instead btw?
>
> Agreed. Or any other AdapterView. Or writing your own AdapterView.
> Anything to reduce your heap and stack consumption.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

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