CursorLoader usage without ContentProvider

前端 未结 5 626

Android SDK documentation says that startManagingCursor() method is depracated:

This method is deprecated. Use the new CursorLoader class

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 13:07

    Write your own loader that uses your database class instead of a content provider. The easiest way is just to take the source of the CursorLoader class from the compatibility library, and replace provider queries with queries to your own db helper class.

提交回复
热议问题