Once a Content provider is updated, how can I inform all listeners there was an update?
Hi basically I have a table, this table is getting information from a content provider I wrote. If I update a content provider how can I force an update on the UI whenever the data is changed in the content provider?
FOr example: If a list is showing A B
and I add C to the content provider
how can I get the UI to show A B C as soon as 开发者_Go百科it updates? Or does it automatically broadcast any changes for me?
Check out this post, which talks about content observers. I would say listen for changes, when one occurs update your list. Since your application is the one doing the inserting (although others may as well), you could just update your list after inserting a record.
精彩评论