问候
我在 MyRequestListener 中使用 RequestProgressListener,如下所示:
@Override
public void onRequestProgressUpdate(RequestProgress progress) {
Log.d(LOG_TAG, "Progress update: " + progress.getProgress());
}
我在日志中看到 RequestProcessor 更改状态,但进度更新不断显示 0。
D//RequestProcessor.java:358(1391): 10:49:39.346 Thread-117 Sending progress PENDING
V//RequestProcessor.java:481(1391): 10:49:39.392 main Notifying 1 listeners of progress com.octo.android.robospice.request.listener.RequestProgress@41356ad0
I//MyRequestListener(1391): Progress update: 0.0
D//RequestProcessor.java:358(1391): 10:49:39.459 Thread-119 Sending progress READING_FROM_CACHE
V//RequestProcessor.java:481(1391): 10:49:39.472 main Notifying 1 listeners of progress com.octo.android.robospice.request.listener.RequestProgress@412e3a68
I//MyRequestListener(1391): Progress update: 0.0
D//RequestProcessor.java:358(1391): 10:49:39.538 Thread-119 Sending progress LOADING_FROM_NETWORK
V//RequestProcessor.java:481(1391): 10:49:39.546 main Notifying 1 listeners of progress com.octo.android.robospice.request.listener.RequestProgress@41294d88
I//MyRequestListener(1391): Progress update: 0.0
D//RequestProcessor.java:358(1391): 10:49:39.757 Thread-119 Sending progress WRITING_TO_CACHE
V//RequestProcessor.java:481(1391): 10:49:39.765 main Notifying 1 listeners of progress com.octo.android.robospice.request.listener.RequestProgress@41366160
I//MyRequestListener(1391): Progress update: 0.0
D//RequestProcessor.java:358(1391): 10:49:39.810 Thread-119 Sending progress COMPLETE
V//RequestProcessor.java:481(1391): 10:49:39.820 main Notifying 1 listeners of progress com.octo.android.robospice.request.listener.RequestProgress@413c6da0
I//MyRequestListener(1391): Progress update: 0.0
我错过了什么还是它就是这样?
对我来说很清楚,很难衡量像 REST 请求这样不可预测的事情的进展,但它说它做到了:)
如果需要更多详细信息,请告诉我。