AndroidAnnotations——Publish progress显示进度
2013-12-16 13:23
585 查看
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 { @Background void doSomeStuffInBackground() { publishProgress(0); // Do some stuff publishProgress(10); // Do some stuff publishProgress(100); } @UiThread void publishProgress(int progress) { // Update progress views } }
相关文章推荐
- 用一个二维码做下载地址,自动区分是 ios 还是 android
- android 三种定时器的写法
- AndroidAnnotations——Fork join
- android 中画廊Gallery的单页滑动
- 史上最易懂的Android jni开发资料--NDK环境搭建
- Android 随笔(二) 真机调试
- android开发之adb被绑架
- android 使用开源工具ChkBugReport分析Bugreport
- Android SystemProperties设置/取得系统属性的用法总结
- 基于XMPP协议的Android即时通信系
- 高效使用Bitmaps(二) 后台加载Bitmap
- 高效使用Bitmaps(一) 大Bitmap的加载
- Android中JNI的使用方法
- android广播机制的实现
- Android Task 任务栈
- Android使用 LruCache 缓存图片
- android兼容性测试解决一(转载)
- 谈Android外包项目
- Android开源组件合集
- Android数据库安全解决方案,使用SQLCipher进行加解密