android 19_现在在Android#19中

android 19

Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.

欢迎使用Android Now,这是您持续不断的有关Android开发领域新事物和着名指南。

视频和播客形式的NiA19 (NiA19 in Video and Podcast Form)

This Now in Android is also offered in video and podcast form. It’s the same content, but with less reading required. The article version (keep reading!) is still the place to come for links to all of the content that’s covered.

Android中的 This Now也以视频和播客形式提供。 内容相同,但所需的阅读量更少。 仍然可以使用文章版本(请继续阅读!)链接到所涵盖的所有内容。

视频 (Video)

播客 (Podcast)

Click on the link below, or just subscribe to the podcast in your favorite client app.

单击下面的链接,或只订阅您喜欢的客户端应用程序中的播客。

#Android11:测试版发布会…已推迟 (#Android11: The Beta Launch Show… Postponed)

Image for post

You probably know this already, but the Beta launch show, originally scheduled for June 3, has been postponed. Look for updates on timing and details on the site. In the meantime, more details have been posted about the content that you can expect to see… when it happens. Stay tuned, we’ll have more info on this available soon.

您可能已经知道这一点,但是原定于6月3日发布Beta发布秀已经被推迟。 在网站上查找有关时间安排和详细信息的更新。 同时,发布了有关您期望看到的内容的更多详细信息……发生时。 敬请期待 ,我们将很快提供更多有关此的信息。

Android Studio 4.0 (Android Studio 4.0)

Image for post

Android Studio recently released 4.0 into the stable channel. So if you were waiting for it to come out of Beta, now is your time.

Android Studio最近将4.0发布到了稳定版中 。 因此,如果您正在等待它发布Beta版,现在就是您的时机。

I’ve talked about this release in its earlier incarnations in previous episodes of Now in Android, but here are some of the highlights you can look forward to:

在AndroidNow中的前几集中曾在较早的版本中讨论过此版本,但以下是您可以期待的一些要点:

运动编辑器 (Motion Editor)

Image for post
Motion Editor simplifies the creation of rich and flexible UI animations
Motion Editor简化了丰富灵活的UI动画的创建

MotionLayout is an API (a subclass of ConstraintLayout, to be specific) that you can use to create powerful animations in your UI. It allows you to create before/after states, and then define flexible animations between those states, including integrating with user interactions, which essentially ‘scrub’ between those states. Think of MotionLayout as Transitions on steroids, with more power and flexibility.

MotionLayout是一种API( 具体来说是ConstraintLayout的子类),可用于在UI中创建功能强大的动画。 它允许您创建之前/之后的状态,然后在这些状态之间定义灵活的动画,包括与用户交互集成,这实际上是在这些状态之间“擦洗”。 将MotionLayout视为类固醇的过渡 ,具有更多的功能和灵活性。

But MotionLayout was always intended to be used with a visual tool; creating these animations in XML files is… tedious, and not for the faint of heart or fearful of typing. So check out 4.0 to enjoy the real experience of MotionLayout, with the Motion Editor tool.

但是MotionLayout始终旨在与可视化工具一起使用。 在XML文件中创建这些动画是……乏味的,而不是因为胆小或怕打字。 因此,请使用运动编辑器工具4.0来享受MotionLayout的真实体验。

布局检查器 (Layout Inspector)

Image for post
Layout Inspector, showing off its new 3D containment hierarchy visualization
布局检查器,展示其新的3D容纳层次结构可视化

The Layout Inspector tool has been substantially rewritten to offer powerful new capabilities, such as being able to click through property values to find out where and how they are being assigned. Also, you can see your UI in 3D to visualize the containment hierarchy. And you can now see updates to your UI live in the tool as the app on the device changes.

Layout Inspector工具已被实质性地重写,以提供强大的新功能,例如能够单击属性值以找出它们的分配位置和方式。 另外,您可以在3D模式下查看UI,以可视化包含层次结构。 现在,随着设备上应用程序的更改,您可以在工具中实时查看对UI的更新。

构建分析器 (Build Analyzer)

Image for post
Build analyzer helps catch bottlenecks in build performance
构建分析器有助于发现构建性能瓶颈

Build Analyzer helps you see bottlenecks in your build to help you figure out how to fix them and speed up your build times.

Build Analyzer可帮助您查看构建中的瓶颈,以帮助您确定如何解决它们并加快构建时间。

There are many more features in the release. You can read more about the features in 4.0 in Adarsh Fernando’s blog post:

该版本中还有更多功能。 您可以在Adarsh Fernando的博客文章中了解有关4.0中功能的更多信息:

Also, Yacine Rezgui posted this video overview on the 4.0 release:

另外, Yacine Rezgui在4.0版本中发布了此视频概述:

文章和视频 (Articles & Videos)

Murat Yener published an article in the Kotlin Vocabulary series on reification:

Murat Yener在Kotlin词汇系列中发表了一篇有关归化的文章:

Generics enable compile-type type safety for APIs and structures that otherwise do not offer it, but at the cost of not being able to retrieve those types at runtime. This situation is the result of type erasure. The type informs the compilation step (to ensure that, for example, you’re not passing in an Integer value to a String-typed ArrayList), but is not kept in the bytecode (allowing it to be compatible with APIs that do not have types in them).

泛型为API和结构提供了编译类型类型安全性,否则这些API和结构不提供安全性,但是代价是无法在运行时检索那些类型。 这种情况是类型擦除的结果。 该类型通知编译步骤(例如,确保不将Integer值传递给String类型的ArrayList ),但不保留在字节码中(从而使其与不具有此功能的API兼容)输入)。

Kotlin offers a workaround through the use of the reified keyword, along with inline functions. If you declare a function as both reified and inline, then the Kotlin compiler adds the necessary bytecode under the hood so that the type information is available at runtime.

Kotlin通过使用reified关键字以及内联函数提供了一种解决方法。 如果您同时将函数声明为reifiedinline ,那么Kotlin编译器会在幕后添加必要的字节码,以便在运行时获取类型信息。

Murat also posted a video in the Kotlin Vocabulary series on Object, which goes hand-in-hand with the article The One and Only Object that he posted a few weeks ago (and which was featured in Now in Android #17).

Murat还在Kotlin词汇表系列的Object上发布了一个视频,与他几周前发布的文章The One and Only Object并驾齐驱( 在Android#17中的Now中得到了推荐)。

样例代码 (Sample Code)

The Bubbles sample has been updated to reflect the changes and improvements in the Bubbles API in Android 11.

Bubbles示例已更新,以反映Android 11中Bubbles API的更改和改进。

亚行播客节目 (ADB Podcast Episodes)

There’s been another episode of Android Developers Backstage posted since the last Now in Android. Check it out at the links below, or in your favorite podcast client:

自上次Android版Now发布以来,又发布了Android Developers Backstage一集。 在下面的链接或您喜欢的播客客户端中进行检查:

亚行140:泡沫! (ADB 140: Bubbles!)

In which Tor Norbye, Romain Guy, and I talked with Mady Melor and Artur Tsurkan from the System UI team about the Bubbles features in Android 11. Originally introduced in Android 10 as a developer option, this feature allows users to access conversations in your app throughout the Android UI.

在其中, Tor NorbyeRomain Guy和我与System UI团队的Mady Melor和Artur Tsurkan讨论了Android 11中的Bubbles功能。该功能最初是作为开发人员选项在Android 10中引入的,该功能允许用户访问您应用中的对话在整个Android UI中。

Also check out the Bubbles sample (called out above), which has been updated for Android 11.

另外,请查看已针对Android 11更新的Bubbles示例 (如上所述)。

接着… (Now then…)

That’s it for this time. Check for updates on the Android 11 beta plans! Download Android Studio 4.0! Read the blog and watch the video about the 4.0 release features! Learn about Kotlin reification and the object keyword! Play with the updated Bubbles sample! Listen to the latest ADB podcast episodes! And come back here soon for the next update from the Android developer universe.

这次就是这样。 检查 Android 11 Beta计划的更新 ! 下载Android Studio 4.0 ! 阅读博客,并观看有关4.0版本功能的视频 ! 了解Kotlin的版本化object关键字 ! 玩更新的Bubbles示例 ! 收听最新的亚行播客 ! 并很快返回此处,以获取Android开发人员环境的下一个更新。

翻译自: https://medium.com/androiddevelopers/now-in-android-19-37b130cc657a

android 19

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值