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

修复使用support库27.1.0时退出相机页面图片消失的问题; #232

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 @@ -40,6 +40,7 @@ public class ImageDataSource implements LoaderManager.LoaderCallbacks<Cursor> {
private FragmentActivity activity;
private OnImagesLoadedListener loadedListener; //图片加载完成的回调接口
private ArrayList<ImageFolder> imageFolders = new ArrayList<>(); //所有的图片文件夹
private boolean isLoad;

/**
* @param activity 用于初始化LoaderManager,需要兼容到2.3
Expand Down Expand Up @@ -76,6 +77,8 @@ public Loader<Cursor> onCreateLoader(int id, Bundle args) {

@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
if (isLoad) return;
isLoad = true;
imageFolders.clear();
if (data != null) {
ArrayList<ImageItem> allImages = new ArrayList<>(); //所有图片的集合,不分文件夹
Expand Down