EventBus的使用详解,功能为在Fragment,Activity,Service,线程之间传递消息
2017-06-14 16:50
513 查看
最近跟同事用到了EventBus的使用,之前不太了解EventBus,查阅资料发现EventBus还挺好用的,用法比较简单,下面就把我看到的关于EventBus的博客分享给大家,里面介绍了很多的使用详情,讲述的比较全面,可以分享给大家
http://blog.csdn.net/harvic880925/article/details/40660137
但是在使用之前记得在build.gradle(Moduel:app)中配置一下,
http://blog.csdn.net/harvic880925/article/details/40660137
但是在使用之前记得在build.gradle(Moduel:app)中配置一下,
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile project(':core') compile project(':material') compile project(':weight') compile project(':files') compile project(':http') compile files('libs/jxmpp-core-0.4.1.jar') compile files('libs/jxmpp-util-cache-0.4.2.jar') compile files('libs/smack-android-4.1.7.jar') compile files('libs/smack-android-extensions-4.1.7.jar') compile files('libs/smack-core-4.1.7.jar') compile files('libs/smack-extensions-4.1.7.jar') compile files('libs/smack-im-4.1.7.jar') compile files('libs/smack-sasl-provided-4.1.7.jar') compile files('libs/smack-tcp-4.1.7.jar') compile files('libs/dom4j-1.6.1.jar') compile 'com.alibaba:fastjson:1.2.8' compile 'com.j256.ormlite:ormlite-android:4.48' compile 'com.jph.takephoto:takephoto_library:2.0.4' compile 'com.github.gcacace:signature-pad:1.0.3' compile 'com.android.support:appcompat-v7:23.4.0' compile 'de.greenrobot:eventbus:3.0.0-beta1' compile 'com.contrarywind:Android-PickerView:3.2.4' testCompile 'junit:junit:4.12' }
相关文章推荐
- 一、概述 EventBus是一款针对Android优化的发布/订阅事件总线。主要功能是替代Intent,Handler,BroadCast在Fragment,Activity,Service,线程之间
- EventBus,一个可以在Activity、Fragment、Service之间传递任意类型数据的事件总线框架
- Android中EventBus使用详解之Activity与Activity间消息传递(eclipse版)
- Activity、Service、子线程之间的消息传递轻松实现
- Fragment基本使用(三)——与Activity之间传递数据
- 使用EventBus实现Activity与Fragment之间的跳转
- 使用Handler实现主线程与子线程之间互相传递消息
- 使用Handler在线程之间传递消息所遇到的问题及解决方法
- eventbus线程间轻量级传递消息的使用
- 使用Intent在Activity与Fragment之间传递数据中存在的返回键错乱问题
- EventBus在Activity、Fragment、Service中的使用
- 详解Fragment跟Activity之间的通信 利用handler fragment和activity双向发送消息
- Activity 与 Service 之间的消息传递
- android bundle存放数据详解,activity与activity之间数据传递,fragment与fragment之间数据传递
- Android中Activity、Service和线程之间的通信
- Android中级教程之(五)----->不同Activity之间的数据传递,Bundle对象的使用!
- Activity之间的数据传递-service与activity之间的数据传递
- Android中Activity、Service和线程之间的通信
- 使用Intent对象来实现两个(或多个)Activity之间的跳转,并实现在Activity之间传递参数。
- Activity, Service之间的数据传递通过BroadCastReceive的操作实例代码