未完待續
github
https://github.com/STUFelix/WorryFreeTutor
技術棧
Kotlin(include Kotlin support)
Kotlin的優勢
- 背景雄厚,未來應該較好: Kotlin是由JetBrains公司研發并開源,且在2017年 google I/O 上,google認定Kotlin為第一開發語言。
- Interoperable:Leverage existing libraries for the JVM, Android, and the browser.
- 安全: 可以輕松防止在java中常見的
NullPointerException
問題。 - Concise: Drastically reduce the amount of boilerplate code.
- 和Java百分百兼容: Kotlin、java可相互調用的代碼和庫,在一個項目中可以同時用Java和Kotlin來編寫代碼,且兩者可以通過簡單操作(如Android studio 上一個快捷鍵)完成相互轉換。
項目組成員的學習方式
Kotlin官網: https://kotlinlang.org/docs/reference/
掘金Kotlin專題https://juejin.im/tag/Kotlin
簡書Kotlin專題http://www.lxweimin.com/c/98aaef9f5d2f
MVVM模式
google發布MVVM : DataBinding + ViewModel + LiveData+Livecycle
https://developer.android.com/topic/libraries/architecture/index.html
為什么選擇
- MVP模式存在一定的弊端:
- V 與 P 存在一定的耦合度。 一旦V層某個UI元素更改,那么對應的接口,數據如何映射到UI,事件監聽接口都需要轉變,牽一發而動全身。
- 復雜的業務會導致P層太大,依舊會出現代碼臃腫問題(同MVC中的Activity,出現臃腫問題)
- MVP是以UI為驅動的模型。(而MVVM是以數據為驅動的模型)
- google 2015年推出DataBinding框架(其為構造MVVM的一個工具)
項目組成員的學習方式
MVVM
https://tech.meituan.com/2016/11/11/android-mvvm.html
https://github.com/xitu/gold-miner/blob/master/TODO%2Fapproaching-android-with-mvvm.md
DataBinding
UI設計
UI設計的原則
簡單 清晰 一致性 熟悉感 層次感 高效(響應高效,操作高效) 人性
Android Material Design
為了解決Android平臺的界面風格長期難以統一的問題,google在2014年Google I/O大會上重磅推出了一套全新的界面設計語言——Material Design(為什么能統一呢?因為以前的標準實在太丑,所以很多公司都自行設計)。后來為了解決開發者上手難問題,google在2015年Google I/O大會推出了一個Design Support庫,將Material Design中最具有代表性的一些控件和效果進行了封裝。
項目組成員的學習方式
Android Animation
主界面使用BottomNavigationBar+Fragment+ViewPage仿照主流APP。
Retrofit2 + Rxjava2 +Dagger2
為什么選擇
項目組成員的學習方式
Fresco
為什么選擇
項目組成員的學習方式
其他優化
代碼規范:
阿里巴巴android開發手冊.pdf
阿里巴巴Java開發手冊v1.2.0.pdf
阿里云鏡像倉庫代替google官方依賴
解決Android Studio加載gradle慢的問題
buildscript {
repositories {
// mavenCentral()
// jcenter()
// google()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
allprojects {
repositories {
// mavenCentral()
// jcenter()
// google()
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
}
其他技術
Butterknife
http://www.lxweimin.com/p/3678aafdabc7
RecycleView
設計模式與設計原則
http://www.lxweimin.com/p/6e5eda3a51af
https://juejin.im/post/5a51ef536fb9a01c9a2692b2