package com.album.ui.view;

import android.content.ContentResolver;
import android.database.Cursor;

import com.album.model.AlbumModel;
import com.album.model.FinderModel;
import com.album.ui.widget.ScanCallBack;

import java.util.ArrayList;

/**
 * by y on 17/08/2017.
 */

public interface ScanView {

    void start(ContentResolver contentResolver, ScanCallBack scanCallBack, String bucketId, int page, int count);

    void resultScan(ContentResolver contentResolver, ScanCallBack scanCallBack, String path);

    void scanCursor(ArrayList<AlbumModel> albumModels, int dataColumnIndex, int idColumnIndex, Cursor cursor);

    void cursorFinder(ArrayList<FinderModel> finderModels);

    int cursorCount(String bucketId);

    Cursor getCursor(String bucketId, int page, int count);

    String[] getSelectionArgs(String bucketId);

}

@@ -265,17 +265,1164 @@
 2017.%0A *
-/
+ %3Cp%3E%0A * %3Cp%3E%0A * //        final Activity albumActivity = activity;%0A * //%0A * //        LoaderManager loaderManager = albumActivity.getLoaderManager();%0A * //        final Bundle bundle = new Bundle();%0A * //        bundle.putStringArray(%22albumKey%22, new String%5B%5D%7BbucketId, String.valueOf(page), String.valueOf(count)%7D);%0A * //        loaderManager.initLoader(0, bundle, new LoaderManager.LoaderCallbacks%3CCursor%3E() %7B%0A * //        @Override%0A * //        public Loader%3CCursor%3E onCreateLoader(int id, Bundle args) %7B%0A * //            String%5B%5D albumArgs = bundle.getStringArray(%22albumKey%22);%0A * //            return new CursorLoader(albumActivity,%0A * //                    MediaStore.Images.Media.EXTERNAL_CONTENT_URI,%0A * //                    null,%0A * //                    null,%0A * //                    null,%0A * //                    null);%0A * //        %7D%0A * //%0A * //        @Override%0A * //        public void onLoadFinished(Loader%3CCursor%3E loader, Cursor data) %7B%0A * //            AlbumTool.log(data.getCount());%0A * //        %7D%0A * //%0A * //        @Override%0A * //        public void onLoaderReset(Loader%3CCursor%3E loader) %7B%0A * //%0A * //        %7D%0A * //    %7D);%0A */%0A
 %0A%0Apublic
@@ -1443,17 +1443,16 @@
 nView %7B%0A
-%0A
     void

add scanView CursorLoader sample