渐进式 Jectpack
文章平均质量分 73
-Jay-
You engine is beyond your imagination.
展开
-
ViewBinding、DataBinding、ViewModel上手
这里写自定义目录标题ViewBinding、DataBinding、ViewModel上手ViewBinding、DataBinding、ViewModel上手未经授权,不得转载open api:wanandroid1. 开启 ViewBinding、DataBinding特性// app#build.gradle#android buildFeatures { dataBinding true viewBinding true }2. 添加依赖原创 2021-05-21 11:59:09 · 789 阅读 · 3 评论 -
非 Jectpack 架构项目使用协程(Coroutine)
非 Jectpack 架构项目使用协程(Coroutine)**未经授权,不得转载**项目没有重构为 Jectpack 架构,也没有使用 ViewMode,但鉴于协程的优秀,希望提前使用。普通方法启动协程有 `runBlocking`、`GlobalScope.launch/async`、`MainScope().launch/async`。在实际项目中,前两个 Google 不建议使用,而推荐自定义的协程作用域,第三个是 Kotlin 提供的,符合要求。1. 添加依赖implemen原创 2021-05-20 20:19:05 · 114 阅读 · 1 评论