最近跟同事用到了EventBus的使用,以前不太瞭解EventBus,查閱資料發現EventBus還挺好用的,用法比較簡單,下面就把我看到的關於EventBus的博客分享給你們,裏面介紹了不少的使用詳情,講述的比較全面,能夠分享給你們android
http://blog.csdn.net/harvic880925/article/details/40660137git
可是在使用以前記得在build.gradle(Moduel:app)中配置一下,github
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' }