what is the difference between notifyDataSetChanged() and notifyDataSetInvalidated() ?

2510 views
Skip to first unread message

Sohan badaya

unread,
Aug 4, 2010, 4:16:39 PM8/4/10
to Android Developers, sohan....@sasken.com
Hi All,

I have a doubt that what is the difference between
adapter.notifyDataSetChanged();
adapter.notifyDataSetInvalidated();

because when i used both one by one, both worked exactly same.
Please let me know what is the exact difference between these two.

Thanks,
Sohan Badaya

Romain Guy

unread,
Aug 4, 2010, 4:19:08 PM8/4/10
to android-d...@googlegroups.com
notifyDataSetInvalidated() means that the data inside the adapter is
no longer valid. This will cause ListView to stop populating. There
should seldom be any reason to use it.

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> android-develop...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

--
Romain Guy
Android framework engineer
roma...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

Reply all
Reply to author
Forward
0 new messages