runqueryonbackgroundthread close cursor!解决办法

来源:互联网 发布:网络的利与弊个人示例 编辑:程序博客网 时间:2024/05/16 01:04

杀死进程,清除缓存后,报错runqueryonbackgroundthread close cursor!解决办法:@Override public void changeCursor(Cursor newCursor) { Cursor oldCursor = getCursor(); super.changeCursor(newCursor); if(oldCursor != null && oldCursor != newCursor) { // adapter has already dealt with closing the cursor activity.stopManagingCursor(oldCursor); } activity.startManagingCursor(newCursor); } 标签: Android Android SDK代码片段(1) [全屏查看所有代码]1. [代码][Java]代码 ?12345678910@Overridepublic void changeCursor(Cursor newCursor) { Cursor oldCursor = getCursor(); super.changeCursor(newCursor); if(oldCursor != null && oldCursor != newCursor) { // adapter has already dealt with closing the cursor activity.stopManagingCursor(oldCursor); } activity.startManagingCursor(newCursor); }举报开源中国-程序员在线工具:Git代码托管 API文档大全(1




http://www.oschina.net/code/snippet_103349_37369

0 0
原创粉丝点击