Google I/O 2021结束了, 都有什么精彩内容呢?

Android部分的Playlist附上: Android & Play at Google I/O 2021

Developer Keynote (Google I/O '21)

对于Android的部分来说, 主要是:

Android 12

  • user safety.
  • performance; improved app startup; customizable launch animations.
  • user experience; widgets.

Create beautiful apps, easier

现代化的Android开发.

  • Android Studio的升级.
  • Kotlin: Kotlin Symbol Processing.
  • Jetpack: 各种libraries和Compose.

Build across screens.

  • 各种屏幕.
  • Voice.
  • Watches: Health services.

The top 3 things to know in Modern Android Development | Android @ Google I/O'21

Android开发的三个top topic:

  • Jetpack: 一系列的Jetpack libraries发布了新版.

  • Tooling: Android Studio的升级, 有了WorkManager Inspector, UI的Inspector支持了View和Compose.
  • Kotlin.

What's new in Android | Keynote

Android 12 -> S.

  • @Deprecated -> deprecated.
  • Color.
  • Widgets.
  • Launch animations: 系统自带启动动画, 可以定制.
  • Notifications: 新的template style; Trampoline(?) 优化点开notification的那个短暂延迟.
  • Toasts: 带icon, 说明是哪个app弹的toasts; 控制个数.
  • Picture in Picture的改善.
  • ImageView有个setRenderEffect可以模糊照片了.
  • 可以用theme定制模糊.

  • list的弹力拉伸效果. (我自己起的名字, 其实人家叫stretch overscroll).
  • Graphics: AVIF. 可以过滤支持的media类型.
  • Privacy: 关于permission的一些改进; 剪贴板内容会有toast说明来源; foreground restrictions.

What’s new in Android development tools | Session

Android Studio版本号设计.

  • Preview工具可以设置横屏, 定制尺寸, 显示blueprints, play animation. Compose的preview有交互模式.
  • Accessibility test framework scanner.
  • 适配多种屏幕: Layout validation.
  • 折叠屏, 手表.
  • 模拟器还可以模拟heart rate.
  • snapshots test.
  • WorkManager的tasks.
  • Migrate to Non-Transitive R Classes...

What’s new in Jetpack | Session

解释了Jetpack的初衷和现状.

alpha和beta版本的意思.

  • Experimental Annotations -> Stable.
  • CameraX -> Stable.
  • AppSearch -> Alpha.
  • DataStore -> 用来取代SharedPreferences.

  • Security Crypto -> Stable.
  • Hilt -> Stable.
  • WorkManager -> Stable. (Android Studio也推出了新的WorkManager Inspector.)
  • Room -> Stable.

  • ConstraintLayout -> Stable. MotionLayout + Motion Editor.
  • Fragment -> Stable.

    (详见release notes: https://developer.android.com/jetpack/androidx/releases/fragment.)

    重建了FragmentManager; 新增了get result的callback; 废弃了一些API, 并且Fragment StrictMode可以检测项目中是否还在使用.
  • Navigation -> Alpha. 现在支持多个backstacks.
  • Google Shortcuts -> Alpha.
  • EmojiCompat -> Alpha. (AppCompat 1.4.0以后默认包含.)
  • Paging -> Stable.
  • Macrobenchmark -> Alpha. (app启动和滚动效率; local/CI.)
  • Compose integrations.

What's new in Jetpack Compose | Session

为什么我们需要一个全新的UI Toolkit呢. -> 为了适应更加现代化的开发方式.

faster & easier.

Compose将数据转换成UI.

Checkbox的例子:



UI完全由参数控制. -> single source of truth. 没有其他的状态需要sync.

把参数和回调提到方法参数中去:

  • You completely describe your UI for a given state.
  • The framework updates your UI when the state changes.

这里有个图, 推荐ViewModel暴露一个Screen状态, 集中管理, 然后下发到每个composable.

这样也利于测试.

Compose实现了material design, 提供了组件, 还有theming system.

有一个owl app的实现解说.

和传统view的interop.

State of Kotlin on Android | Session

What’s new in Android Gradle plugin | Session

New APIs in the Android Gradle Plugin

Using Jetpack libraries in Compose | Session

Jetpack Compose和Jetpack中其他库可以很好的结合使用.

Top 12 tips to get ready for Android 12 | Session

Getting Ready for Android 12.

  • Developer Options -> App Compatibility Changes.
  • Foreground services were designed for multi-tasking and completing a user action. -> 从后台启动foreground services将被限制.
  • Expedited Jobs with WorkManager APIs.
  • User may turn off the mic and camera sensors using mic and camera toggles.
  • Apps that have not been used for an extended period will be hibernated. (permissions, storage, services)
  • Nearby device permission. Decouple Bluetooth scanning from Location.
  • MAC address restriction.
  • Safe component exporting. 有intent filter就必须显式声明exported.
  • Custom notifications deprecation.
  • App link improvements.
  • WebView Samesite.
  • New stretch overscroll.

Google I/O 2021 Android精华内容的更多相关文章

  1. Android - 分享内容 - 接收其他APP的内容

    就象程序可以发送数据给其他程序,所以也可以接收其他程序的数据.想一下用户如何和程序交互,以及想从其他程序接收什么样类型的数据.例如,一个社交程序可能对接收其他程序的文字(比如有趣的网址)感兴趣.Goo ...

  2. Google 地图 API for Android

    原文:Introduction to Google Maps API for Android 作者:Eunice Obugyei 译者:kmyhy 从健康类 app Runkeeper 到游戏 app ...

  3. Android Google 地图 API for Android

    从健康类 app Runkeeper 到游戏 app 精灵宝可梦,位置服务对现代 app 来说越来越重要. 在本文中,我们将创建一个 app,名字就叫做 City Guide.这个 app 允许用户搜 ...

  4. 一培训机构设计的学习android课程内容:供大家参考

    转自:http://www.cnblogs.com/csj007523/archive/2011/06/16/2082682.html 一培训机构设计的学习android课程内容:供大家参考 第一阶段 ...

  5. 如何使用Google Map API开发Android地图应用

    两年前开发过的GoogleMap已经大变样,最近有项目要用到GoogleMap,重新来配置Android GoogleMap开发环境,还真是踩了不少坑. 一.下载Android SDK Manager ...

  6. 【风马一族_Android】Android 前端内容1

    Android 前端内容 4.1 View 类概述 4.1.1 关于 View //类型说明 view(视图)指的是用户界面组件的基本构建基块.一个视图占据屏幕上的矩形区域,负责绘图和事件处理.视图是 ...

  7. 【风马一族_Android】Android 前端内容

    Android 前端内容 4.1 View 类概述 4.1.1 关于 View //类型说明 view(视图)指的是用户界面组件的基本构建基块.一个视图占据屏幕上的矩形区域,负责绘图和事件处理.视图是 ...

  8. android RelativeLayout 内容居中解决办法

    android RelativeLayout 内容居中解决办法:   使用Linearlayout本来利用父控件的gravity属性是很好解决的.但是对应RelativeLayout虽然有 gravi ...

  9. Google用户登录界面 Android实现

    实验效果: 项目目录: Java代码(放在Src文件下) package com.bn.chap9.login; import java.io.BufferedReader; import java. ...

随机推荐

  1. 设计原则:接口隔离原则(ISP)

    接口隔离原则的英文是Interface Segregation Principle,缩写就是ISP.与里氏替换原则一样其定义同样有两种 定义1: Clients should not be force ...

  2. Seata搭建与分布式事务入门

    在单体架构下,我们大多使用的是单体数据库,通过数据库的ACID特性支持,实现了本地事务.但是在微服务架构下复杂的业务关系中,分布式事务是不可避免的问题之一.Seata是Spring Cloud Ali ...

  3. kubectl create / replace 与kubectl apply 的区别

    kubectl create / replace 以ngnix 的 nginx.yaml为例: apiVersion: apps/v1 kind: Deployment metadata: name: ...

  4. 在Android、iOS、Web多平台使用AppGallery Connect性能管理服务

    性能管理(App Performance Management,简称APM)是华为应用市场AppGallery Connect(简称AGC)质量系列服务中的其中一项,可以提供分钟级应用性能监控能力,支 ...

  5. Codeforces Global Round 14 E. Phoenix and Computers

    题目链接 点我跳转 题目大意 给定 \(N\) 台电脑,起初每台电脑都是关闭的 现在你可以随意打开电脑,但如果第 \(i-1\).第 \(i+1\) 台电脑是开启的,则第 \(i\) 台电脑也会自动开 ...

  6. jq 获取表单全部数据

    jQuery Ajax 操作函数: serialize(): 将表单内容序列化为字符串 serializeArray():序列化表单元素,返回JASON数据 语法: $(selector).seria ...

  7. cf534D 枚举握手次数

    题意:       有n个学生进教室,先后顺序不同,每个人进去后会和当前在教室里的人握手,并且记录人数,而且当教室里有超过三个人的时候 他们有可能组队去参加比赛,后来的人看不到他们. 思路:     ...

  8. 迪杰斯特拉(Dijkstra) 最短路算法

    直接看B站视频吧: https://www.bilibili.com/video/BV1QK411V7V4/

  9. python 读写 HDFS

    pandas dataframe写入hdfs csv文件的两种方式: 1. from hdfs.client import Client cleint.write(hdfs_url, df.to_cs ...

  10. Python中的迭代器、生成器、装饰器

    1. 迭代器  1 """ 2 iterator 3 迭代器协议: 对象必须提供一个next()方法,执行该方法要么返回迭代中的下一项,要么引起一个StopIterati ...