runqueryonbackgroundthread close cursor
解决办法:
在adapter里添加如下代码
@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);
}
参考:http://stackoverflow.com/questions/12793274/can-someone-explain-to-me-on-runqueryonbackgroundthread