EventBus的使用詳解,功能為在Fragment,Activity,Service,線程之間傳遞消息


最近跟同事用到了EventBus的使用,之前不太了解EventBus,查閱資料發現EventBus還挺好用的,用法比較簡單,下面就把我看到的關於EventBus的博客分享給大家,里面介紹了很多的使用詳情,講述的比較全面,可以分享給大家

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'
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM