我是靠谱客的博主 狂野自行车,最近开发中收集的这篇文章主要介绍Android 官方示例:android-architecture 学习笔记(一),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

项目地址:https://github.com/googlesamples/android-architecture

architecture的解释:n. 建筑学;建筑风格;建筑式样;建筑艺术;架构。
说明该项目就是GG官方的一个关于架构的示例

项目down下来之后,使用git 查看分支就是一个个简单的架构示例
如下:

 master
  todo-databinding
* todo-mvp
  todo-mvp-clean
  todo-mvp-contentproviders
  todo-mvp-dagger
  todo-mvp-loaders
  todo-mvp-rxjava
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev-todo-mvp-clean-fix-memory-leak
  remotes/origin/dev-todo-mvp-tablet
  remotes/origin/dev-todo-mvp-tablet_dialogfragment
  remotes/origin/dev-todo-mvvm-databinding
  remotes/origin/master
  remotes/origin/todo-databinding
  remotes/origin/todo-mvp
  remotes/origin/todo-mvp-clean
  remotes/origin/todo-mvp-contentproviders
  remotes/origin/todo-mvp-dagger
  remotes/origin/todo-mvp-loaders
  remotes/origin/todo-mvp-rxjava

README.md中的描述:

Stable samples

SampleDescription
todo‑mvpDemonstrates a basic Model‑View‑Presenter (MVP) architecture and provides a foundation on which the other samples are built. This sample also acts as a reference point for comparing and contrasting the other samples in this project.
todo‑mvp‑loadersFetches data using the Loaders API.
todo‑databindingUses the Data Binding Library.
todo‑mvp‑cleanUses concepts from Clean Architecture.
todo‑mvp‑daggerUses Dagger2 to add support for dependency injection.
todo‑mvp‑contentprovidersBased on the todo-mvp-loaders sample, this version fetches data using the Loaders API, and also makes use of content providers.
todo‑mvp‑rxjavaUses RxJava to implement concurrency, and abstract the data layer.

Samples in progress

SampleDescription
dev‑todo‑mvp‑tabletAdds a master and detail view for tablets.
dev‑todo‑mvvm‑databindingBased on the todo-databinding sample, this version incorporates the Model‑View‑ViewModel architecture.

For information about planned samples, see “New sample” issues.

External samples

External samples are variants that may not be in sync with the rest of the branches in this repository.

SampleDescription
todo‑mvp‑fragmentlessUses View objects instead of Fragment objects.
todo‑mvp‑conductorUses the Conductor framework to refactor the app to use a single Activity architecture.

简单的说下,”stable samples” 就是稳定的示例;”smaples in progress”就是正在完善开发中的示例;”external samples”就是其他一些开发者fork本项目后做的一些改进版

关于todo app这个项目的内容,它的基本业务:核心就是一个任务列表。包括编辑创建任务(任务属性有标题和内容);勾选已完成的任务;查看所有任务列表,有三种状态,All、Active、Completed;任务统计
不同分支,只是用了不同的architecture

最后

以上就是狂野自行车为你收集整理的Android 官方示例:android-architecture 学习笔记(一)的全部内容,希望文章能够帮你解决Android 官方示例:android-architecture 学习笔记(一)所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(44)

评论列表共有 0 条评论

立即
投稿
返回
顶部