![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
开源框架
xiaofei924
fighting!
展开
-
EventBus3.0基本使用
一.概述EventBus是一个用于Android和Java的开源库,使用发布者/订阅者模式实现松散耦合。EventBus使中央通信仅用几行代码就能解耦类——简化代码、消除依赖和加速应用程序开发。二.使用1.依赖compile 'org.greenrobot:eventbus:3.0.0'2.代码中基本使用(1)首先先定义一个事件,用于事件的发布和消息传递publ...原创 2019-05-29 14:46:04 · 325 阅读 · 0 评论 -
ARouter基本使用
一.介绍ARouter可以通过url进行索引跳转,比系统原生的跳转(需要依赖类或AndroidManifest)更灵活 可以解耦,便与团队协作开发,常用于组件化中二.配置1.组件化BaseModule的build.gradle中添加implementation 'com.alibaba:arouter-api:1.3.0'2.在跳转的目标组件的build.gradle中,增加...原创 2019-07-19 17:30:16 · 1276 阅读 · 0 评论