You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
}