Android Otto 使用
来源:互联网 发布:mac沙盒机制 编辑:程序博客网 时间:2024/06/04 18:56
最近做的项目用到了Otto,记录一下,
官方地址:http://square.github.io/otto/
github地址:https://github.com/square/otto
android 传统的事件传递,有Handler 、broadcastReceiver,个人觉得broadcastReceiver 最难用。
otto 使用:
1.otto 使用注解定义订阅和发布的角色,@Subscribe 订阅者(接收),@Produce 发布者(发送消息),这个注解定义到方法名称上即可
2.otto Bus 这个类没有自己实现单例,需要我们自己实现
3.otto 订阅和发布都需要注册(register和unregister)
0 0
- Android Otto 的使用
- Android Otto 使用
- android中的 Otto使用
- android事件总线 otto使用
- Android中使用Otto来传播事件
- Android上的otto的使用
- Android事件总线框架Otto使用
- Android 的Otto插件的使用
- Android 事件总线Otto使用入门一
- Android事件总线 Otto框架使用
- Android 中关于otto的使用
- Android otto 事件总线的使用(使用场景)
- 浅学使用Android的mvp模式+otto消息总线
- android中Otto事件总线框架的使用
- Android Otto框架浅析
- Android Otto框架浅析
- Android Otto框架浅析
- Android Otto框架浅析
- C++多返回值
- 通过代码控制View的触摸事件被触发
- 性能优化之数据库优化
- Hash_map的使用
- css
- Android Otto 使用
- NoClassDefFoundError: org/openxmlformats/schemas/drawingml/x2006/main/ThemeDocument
- Android点击EditText文本框之外任何地方隐藏键盘的解决办法
- mac 安装 gradle
- 南邮 OJ 1214 排列的字典序问题
- typedef定义数组指针操作一维数组
- VirtualBox增强包安装,设置共享文件夹(fedora和win7)
- CAN总线之一
- hdu5253 连接的管道 最小生成树水题