Difference between ContentObserver and DatasetObserver?

前端 未结 4 2036
你的背包
你的背包 2021-01-30 11:15

What is difference between ContentObserver and DatasetObserver?

When one or another should be used?

I get Cursor with sing

4条回答
  •  盖世英雄少女心
    2021-01-30 11:37

    To provide the supplement to ptc's answer, DataSetObserver is used for handling content changes in the Adapter, for example, it can be used for updating listview dynamically with Adapter. You can register a DataSetObserver using the Adapter#registerDataSetObserver() method.

    DataSetObserver can also be used to observe the content changes in the Cursor in a similar fashion.

提交回复
热议问题