How do I get the _count in my content provider?

后端 未结 4 856
没有蜡笔的小新
没有蜡笔的小新 2020-12-13 17:32

What should I do to get my content provider to return the _count column with the count of records? The documentation says it is automatic, but maybe it\'s only taking about

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 18:11

    If you are using ContentProvider.query() a Cursor is returned. Call Cursor.getCount() to get a count of records in the returned cursor.

提交回复
热议问题