Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Publish progress

pyricau edited this page Jan 10, 2012 · 3 revisions

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.

Here is a simple example:

@EActivitypublicclassMyActivityextendsActivity {
@BackgroundvoiddoSomeStuffInBackground() {
publishProgress(0);
// Do some stuffpublishProgress(10);
// Do some stuffpublishProgress(100);
}
@UiThreadvoidpublishProgress(intprogress) {
// Update progress views
}
}

Using AndroidAnnotations

Questions?

Enjoying AndroidAnnotations

Improving AndroidAnnotations

Extending AndroidAnnotations

Clone this wiki locally