From 1d7f59c0a54c74b81acca4bc9eeaca132e67d115 Mon Sep 17 00:00:00 2001 From: laoyuyu <511455842@QQ.com> Date: Fri, 17 Nov 2017 16:18:41 +0800 Subject: [PATCH] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e4d99ede..1b592c21 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,17 @@ protected void onCreate(Bundle savedInstanceState) { ```java //在这里处理任务执行中的状态,如进度进度条的刷新 -@Download.onTaskRunning(DOWNLOAD_URL) protected void running(DownloadTask task) { +@Download.onTaskRunning protected void running(DownloadTask task) { + if(task.getUrl().eques(url)){ + .... + 可以通过url判断是否是指定任务的回调 + } int p = task.getPercent(); //任务进度百分比 String speed = task.getConvertSpeed(); //转换单位后的下载速度,单位转换需要在配置文件中打开 String speed1 = task.getSpeed(); //原始byte长度速度 } -@Download.onTaskComplete(DOWNLOAD_URL) void taskComplete(DownloadTask task) { +@Download.onTaskComplete void taskComplete(DownloadTask task) { //在这里处理任务完成的状态 } ```