Updated 注解使用 (markdown)

laoyuyu
2017-09-13 11:13:50 +08:00
parent 213ee52917
commit 7d9b952f0d

@ -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单任务下载注解
| 注解 | 说明 | 示例 |