Android: how to unregister the ContentObserver and DataSetObserver of a CursorAdapter
-
13-03-2021 - |
質問
I found there is no interface in side CursorAdapter to unregister the ContentObserver and DataSetObserver it apply. I can only use Cursor.getCursor().close() to close the cursor but cannot unregister its observers.
解決
Calling CursorAdapter.changeCursor(null) will unregister all the observers and close the cursor.
所属していません StackOverflow