首先来看实现方式:
public void download(View view) {
List<BaseBean> baseBeanList = new ArrayList<>();
for (int i = 0;i < paths.length; i++){
BaseBean baseBean = new BaseBean();
baseBean.setUrl(paths[i]);
baseBean.setFilename("picture" + i);
baseBeanList.add(baseBean);
}
new DownloadPicture.DownloadPictureBuilder(baseBeanList)
.setLocalDir("/0000/")
.setPictureFormat(PNG)
.build()
.download(MainActivity.this, new IDownload() {
@Override
public void start() {
Log.i("download","start");
}
@Override
public void progress(int progress) {
Toast.makeText(MainActivity.this,"当前进度为:" + progress,Toast.LENGTH_SHORT).show();
Log.i("do