Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

进入下一个界面返回,游标问题 #282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
imageFolders.clear();
if (data != null) {
ArrayList<ImageItem> allImages = new ArrayList<>(); //所有图片的集合,不分文件夹
data.move(-1);//默认第一次进入的时候游标在-1的位置,读取的时候从0开始读取,但如果进入下一个界面返回此时游标在0,会从1开始读,导致第一个读取不到
while (data.moveToNext()) {
//查询数据
String imageName = data.getString(data.getColumnIndexOrThrow(IMAGE_PROJECTION[0]));
Expand Down