Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
感谢这么棒的图书馆。只是想知道有没有办法在下载大尺寸图像/文件时获取进度或字节大小BinaryHttpResponseHandler。等待回应。
BinaryHttpResponseHandler
希望获得使用它的示例代码。
您所要做的就是覆盖 OnProgress 方法:
@Override public void onProgress(long bytesWritten, long totalSize) { long progressPercentage = (long)100*bytesWritten/totalSize; }