Android异步网络和图片加载库:ion

jopen 10年前

ion是的一个Android异步网络和图片加载库。

ion-sample.png

特性

带进度条下载文件的示例:
Ion.with(context)  .load("http://example.com/really-big-file.zip")  // have a ProgressBar get updated automatically with the percent  .progressBar(progressBar)  // and a ProgressDialog  .progressDialog(progressDialog)  // can also use a custom callback  .progress(new ProgressCallback() {@Override     public void onProgress(int downloaded, int total) {         System.out.println("" + downloaded + " / " + total);     }  })  .write(new File("/sdcard/really-big-file.zip"))  .setCallback(new FutureCallback<File>() {     @Override      public void onCompleted(Exception e, File file) {          // download done...          // do stuff with the File or error      }  });

项目主页:http://www.open-open.com/lib/view/home/1409192622275