From 7d9b952f0d61fd4452794f59107191990a628f24 Mon Sep 17 00:00:00 2001 From: laoyuyu <511455842@QQ.com> Date: Wed, 13 Sep 2017 11:13:50 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20=E6=B3=A8=E8=A7=A3=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 注解使用.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/注解使用.md b/注解使用.md index 4b64985..64f587e 100644 --- a/注解使用.md +++ b/注解使用.md @@ -20,6 +20,13 @@ 在上面的例子中,只有下载地址是`https://test.xx.apk`和`http://test.xx2.apk`才会触发 `taskRunning(DownloadTask task)`方法。 除了用注解判断任务外,你还可以使用`task.getKey()`来判断当前任务,`getKey()`返回的是下载地址或上传任务 +```java +@Download.onTaskRunning void taskRunning(DownloadTask task) { + if(task.getKey().eques(DOWNLOAD_URL)){ + mAdapter.setProgress(task.getDownloadEntity()); + } +} +``` ## HTTP\FTP单任务下载注解 | 注解 | 说明 | 示例 |