References : http://wangshuaibo.iteye.com/blog/750706
error:
android.database.CursorIndexOutOfBoundsException: Index 4 requested, with a size of 4
solution:
if (subCur.moveToFirst()) {// 判断游标是否为空
for (int j = 0; j \< subNum; ++j) {
subCur.move(j);// 移动到指定记录
。。。。
}
}
改成
for (int j = 0; j < subNum; ++j) {
if (subCur.moveToFirst()) {// 判断游标是否为空
subCur.move(j);// 移动到指定记录
。。。。
}
}