cre wrote:
> I didn't answer your previous question.  No, there are not problems
> with other Adapters only the ones in TabHost.
> I went back and looked at the Hierarchyviewer property values and it
> shows an item count of 3, which is the number of items in this
> ListView that should be visible but are not.  I am sure I will see the
> same thing with getCount() next time it fails. So I would say that the-
> adapter-thinks-its-empty theory is negative.  It thinks it has 3 items
> but has lost the pointer to them somehow.
> 
> I also didn't make it clear that this problem only occurs after
> leaving the activity and returning. As long as I remain in the
> activity there is no problem with the ListViews.  That is why I
> suggested putting the code in onResume().
> 
> At this point I firmly believe that this is a bug.

That is quite likely. The question is, a bug in what?

I recommend you try replacing ArrayAdapter.createFromResource() with
some other constructed Adapter (e.g., new ArrayAdapter()) and see if the
problem persists. If the problem goes away, then the problem is fairly
well narrowed down, and you have a workaround. I suspect that
createFromResource() is not the most popular way of creating adapters,
so it is possible the difficulty lies there.

Also, is this on 1.5 final, or some other edition? If you are not on 1.5
final, you probably should try it there, since the issue might have been
resolved.

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

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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