Alexey,
ListView chashes in case of:
if (mItemCount != mAdapter.getCount()) {
throw new IllegalStateException("The content of the
adapter has changed but "
+ "ListView did not receive a notification.
Make sure the content of "
+ "your adapter is not modified from a
background thread, but only "
+ "from the UI thread.");
}
(it is a quote from sources ListView.java) and only in this case.
Thus, if number of elements wasn't changed, everything is ok.
On 15 окт, 16:47, Alexey <[email protected]> wrote:
> Romain, one more question. Is this rule applicable for adding/removing
> elements from adapter (in other words - changing number of elements in
> ListView) or also when changing content of elements?
>
> On 15 окт, 16:31, Alexey <[email protected]> wrote:
>
> > Romain, your answers are clear, but confusing. As I understood
> > modifying adapter should be done in workerthreadand only
> > notifyDataSetChanged in UIthread.
> > Now as I see the concept is different, but what if we need to add
> > several hundred items into adapter, won't UIthreadbe in freeze for
> > this time?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---