Ahh just after I posted I think it clicked!

So notifyDataSetChanged() seems to be more useful for ListViews
adapters that aren't database driven...  Such as array of data.

The requery is exactly what it says it requeries the data it updates
it...

Thanks guys! :)

On Jul 3, 10:23 pm, Moto <medicalsou...@gmail.com> wrote:
> So from what I understand when I modify my database table and I want
> the changes to show requery is the way to do it?  I'm still a little
> confused about notifyDataSetChanged() when that would be useful...
>
> @Android Dev, I don't see any function setNotifyOnChange(..)?
>
> Thanks for the help guys!
> -Moto
>
> On Jul 2, 4:47 am, Android Development <indodr...@gmail.com> wrote:
>
> > I think for getting this callback, you need to call setNotifyOnChange(true).
>
> > On 7/2/10, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > > On Thu, Jul 1, 2010 at 10:51 PM, Moto <medicalsou...@gmail.com> wrote:
> > >> But not sure if design wise is good? Why doesn't
> > >> notifyDataSetChanged() work? what's the difference on what I just did?
>
> > > requery() reloads the Cursor's data.
>
> > > notifyDataSetChanged() tells an Adapter's listeners that its data has
> > > changed.
>
> > > requery() on a Cursor will cause an attached CursorAdapter to call
> > > notifyDataSetChanged(), after having loaded in the new data.
>
> > > Calling notifyDataSetChanged() yourself, without actually having
> > > changed the data set, will not work.
>
> > > --
> > > Mark Murphy (a Commons Guy)
> > >http://commonsware.com|http://github.com/commonsguy
> > >http://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > Android Training...At Your Office:http://commonsware.com/training
>
> > > --
> > > 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

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