package me.xudaojie.ninesquare.load;

import android.content.Context;

import java.util.ArrayList;

/**
 * Created by xdj on 2016/10/28.
 * todo 未完成
 */
public class PhotoSquare {

    private Context mContext;
    private Request mRequest;

    private PhotoSquare(Context context) {
        mContext = context;
    }

    public static PhotoSquare with(Context context) {
        return new PhotoSquare(context);
    }

    public Request loadUrl(ArrayList<String> urls, int currentPosition) {
        return mRequest = new Request(mContext, urls, currentPosition);
    }

//    public RequestOptions loadFile(ArrayList<File> files) {
//        mFiles = files;
//        return mRequestOptions = new RequestOptions();
//    }

//    public RequestOptions loadResource(ArrayList<Integer> resourceId) {
//        mResourceIds = resourceId;
//        return mRequestOptions = new RequestOptions();
//    }

}

@@ -485,24 +485,222 @@
 Position) %7B%0A
+        if (currentPosition %3E urls.size() - 1) %7B%0A            throw new IndexOutOfBoundsException(%22current position %22 + currentPosition%0A                    + %22 url length %22 + urls.size());%0A        %7D%0A
         retu

add currentPosition越界异常