当前位置: 代码迷 >> 综合 >> AndroidAnnotations——Publish progress显示进度
  详细解决方案

AndroidAnnotations——Publish progress显示进度

热度:52   发布时间:2023-12-11 23:58:16.0
  99人阅读  评论(0)  收藏  举报
AndroidAnnotation

目录(?)[+]

Publish progress

Since AndroidAnnotations 1.0

Publish progress made easy

It's actually quite easy to deal with progress reports when you let AndroidAnnotations handle thread related boilerplate code.当你使用AA操作线程相关样板代码时,处理起进度报告来确实相当简单。

Here is a simple example:下面有个简单的例子:

@EActivity
public class MyActivity extends Activity {
        @Backgroundvoid doSomeStuffInBackground() {
        publishProgress(0);// Do some stuffpublishProgress(10);// Do some stuffpublishProgress(100);}@UiThreadvoid publishProgress(int progress) {
        // Update progress views}}
  相关解决方案