安卓构架组件——概述 Android Architecture Components

谷歌官文文档地址:https://developer.android.google.cn/topic/libraries/architecture

安卓构架组建是库的集合:帮助你设计健壮的、易测试的、可维护的应用。使用类作为入口管理UI组建的生命周期和处理数据持久化。

Android architecture components are a collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.

  • 了解将健壮的应用放在一起的基础知识请看应用构架指南。Learn the basics of putting together a robust app with theGuide to app architecture.

  • 管理应用的生命周期。新的生命周期感知组建技术帮助管理Activity和fragment的生命周期。保持设置的改变、避免内存泄漏并且更容易的将数据载入UI。Manage your app‘s lifecycle. New lifecycle-aware componentshelp you manage your activity and fragment lifecycles. Survive configuration changes, avoid memory leaks and easily load data into your UI.
  • 使用LiveData创建数据对象,这样底层数据更改时会通知用户界面。 Use LiveData to build data objects that notify views when the underlying database changes.
  • ViewModel用于保存和用户界面香港的数据,这样界面旋转时相关的数据不会被丢失。 ViewModel stores UI-related data that isn‘t destroyed on app rotations.
  • Room是一个SQLite对象映射库。使用它来避免样板代码,并轻松地将SQLite表数据转换为Java对象。 Room提供了SQLite语句的编译时检查,并且可以返回RxJava,Flowable和LiveData可观察对象。 Room is a SQLite object mapping library. Use it to avoid boilerplate code and easily convert SQLite table data to Java objects. Room provides compile time checks of SQLite statements and can return RxJava, Flowable and LiveData observables.

原文地址:https://www.cnblogs.com/edzjx/p/11621696.html

时间: 2024-07-30 07:29:36

安卓构架组件——概述 Android Architecture Components的相关文章

App 组件化/模块化之路——Android 框架组件(Android Architecture Components)使用指南

面对越来越复杂的 App 需求,Google 官方发布了Android 框架组件库(Android Architecture Components ).为开发者更好的开发 App 提供了非常好的样本.这个框架里的组件是配合 Android 组件生命周期的,所以它能够很好的规避组件生命周期管理的问题.今天我们就来看看这个库的使用. 通用的框架准则 官方建议在架构 App 的时候遵循以下两个准则: 关注分离 其中早期开发 App 最常见的做法是在 Activity 或者 Fragment 中写了大量

安卓构架组件——向项目添加组件(Adding Components to your Project)

在开始之前,建议阅读 应用架构指南. Before getting started, we recommend reading the Architecture Components Guide to App Architecture. The guide has some useful principles that apply to all Android apps, and shows how to use the Architecture Components together. 原文地

Android Architecture Components--项目实战

转载请注明出处,谢谢! 上个月Google Android Architecture Components 1.0稳定版发布,抽工作间隙写了个demo,仅供参考 Github地址:https://github.com/AllenWen/android-iWeather 1.亮点 一是生命周期管理---Lifecycles,各类组件的引用与周期绑定,从而有效避免内存泄漏: 二是LiveData,数据流中的主角,作用类似于Rx的Observer; 三是推出全新数据库ORM框架---Room,当然也是

[转载]SharePoint 2013搜索学习笔记之搜索构架简单概述

Sharepoint搜索引擎主要由6种组件构成,他们分别是爬网组件,内容处理组件,分析处理组件,索引组件,查询处理组件,搜索管理组件.可以将这6种组件分别部署到Sharepoint场内的多个服务器上,组成适合需求的Sharepoint搜索场,搜索场的体系结构设计主要参考量是爬网内容量,微软根据爬网内容量不同将搜索场分为大型场,中型场和小型场,更多详细信息可参考: SharePoint Server 2013 中的搜索概述和在SharePoint Server 2013 中规划企业搜索体系结构.

2.1安卓视图组件

1视图组件与容器组件 1)绝大部分安卓UI组件都存放与android.widget包及其子包,android.view及其子包 2)安卓所有 UI组件都继承自View类 3)View类有一个非常重要的子类:ViewGroup,但是ViewGroup经常作为其他组件的容器使用,安卓采用组合器模式设计View和ViewGroup VIewGroup可以当作View使用,但一般都是作为容器使用;但是ViewGroup是抽象类 实际都是用他的子类,如各种布局管理器 /** * <p> * A <

安卓高级组件-----进度条

进度条组件是安卓重要组件之一.当后台某个程序执行时,前台进度条动态显示了程序执行进度的百分比.是耗时较长的程序让用户觉得在自己的掌控之中,提高程序的友好型. 安卓支支持几种风格的进度条,能通过style属性呢设置进度条风格,该属性如下: @android:style/Widget.ProgressBar.Horizontal    水平进度条 @android:style/Widget.ProgressBar.Inverse        普通环形进度条 @android:style/Widge

Architecture Components

1.Why "Architecture" Components? 2.what does architecture components include? { Room //a robust SQL object mapping library ViewModel //provide data for UI components and survive configuration changes LiveData  //monitor changes,database observer

理解安卓支持库(Android Support Library)

安卓平台其中一个很牛逼的地方在于它支持各种不同的设备.从你的平板电脑,到你的手机,电视等,安卓无处不在.安卓想成为一个全领域的移动计算平台.光从它的数量上来说,已经算是很成功了. 支持所有这些设备是有一些挑战的.不管硬件还是软件上的不同,用户希望应用程序可以在每一台设备上用样的运行:同样,对于开发者来说,你不能总指望用户已经升级到最近的安卓版本.事实上,开发者遇到的用户大多使用18个月前或者更老的版本. 如果没有安卓团队的帮助,开发者会不得不做些“丑陋的代码”去兼容那些使用老版本的用户.幸运的是

Sharepoint2013搜索学习笔记之搜索构架简单概述(一)

Sharepoint搜索引擎主要由6种组件构成,他们分别是爬网组件,内容处理组件,分析处理组件,索引组件,查询处理组件,搜索管理组件.可以将这6种组件分别部署到Sharepoint场内的多个服务器上,组成适合需求的Sharepoint搜索场,搜索场的体系结构设计主要参考量是爬网内容量,微软根据爬网内容量不同将搜索场分为大型场,中型场和小型场,更多详细信息可参考:SharePoint Server 2013 中的搜索概述和在SharePoint Server 2013 中规划企业搜索体系结构. S