一、参考文档
-
android-architecture
tudo-app.png-
The Clean Architecture
The Clean Architecture
-
Model-View-Presenter Architecture in Android Applications
Model-View-Presenter
MVP
二、名词解释
三、构建 RoomBookerMVP 项目
RoomBookerMVP-stractureMVP + Dagger2 + Retrofit2 + RxJava + ButterKnife
四、构建todo-app项目
-
在SourceTree Settings中配置Github使用SSH协议
-
从github Clone android-architecture仓库
git clone git@github.com:googlesamples/android-architecture.git
或者使用https Url来clone
https://github.com/googlesamples/android-architecture.git
-
在SourceTree中checkout出android-architecture仓库中的对应分支(master分支不能编译,请使用其他分支,例如 todo-mvp、todo-mvp-dagger、todo-mvp-rxjava等)
-
在AndroidStudio中打开checkout到本地的仓库中android-architecture/todoapp/目录中项目,例如我的本地仓库如下:
/environment/git-repo/android-architecture/todoapp
-
之后需要切换分支,只需要在SourceTree中切换分支即可在Android Studio中看到代码分支切换。
-
名词解释
- parentActivityName
- android:allowBackup="false"
- android:supportsRtl="true"
- android:theme="@style/AppTheme.OverlapSystemBar"
- classpath 'com.android.tools.build:gradle:2.3.0'
- minSdkVersion
- targetSdkVersion
- compileSdkVersion
- buildToolsVersion
- supportLibraryVersion
- android.support.v4.widget.DrawerLayout
- android.support.design.widget.AppBarLayout
- android.support.v7.widget.Toolbar
- android.support.design.widget.FloatingActionButton
- android.support.design.widget.NavigationView
- ContextCompat.getColor()
- 结束了!
-
The Clean Architecture
网友评论