Asynclayoutinflater

  
异步膨胀布局以避免界面卡顿。
最新更新 稳定版 候选版本 Beta 版 Alpha 版
2025 年 4 月 9 日 1.1.0 - - -

声明依赖项

要添加对 AsyncLayoutInflater 的依赖项,您必须将 Google Maven 代码库添加到您的项目中。如需了解更多信息,请阅读Google 的 Maven 代码库

在您的应用或模块的 build.gradle 文件中添加所需工件的依赖项

Groovy

dependencies {
    implementation "androidx.asynclayoutinflater:asynclayoutinflater:1.1.0"
}

Kotlin

dependencies {
    implementation("androidx.asynclayoutinflater:asynclayoutinflater:1.1.0")
}

反馈

您的反馈有助于改进 Jetpack。如果您发现新问题或有改进此库的建议,请告诉我们。在创建新问题之前,请查看此库中的现有问题。您可以通过点击星形按钮为您关注的现有问题投票。

创建新问题

如需了解更多信息,请参阅问题跟踪器文档

此工件没有版本说明。

版本 1.1.0

版本 1.1.0

2025 年 4 月 9 日

androidx.asynclayoutinflater:asynclayoutinflater:1.1.0androidx.asynclayoutinflater:asynclayoutinflater-appcompat:1.1.0 已发布。版本 1.1.0 包含这些提交

自 1.0.0 以来的重要更改

  • 允许在初始化 AsyncLayoutInflater 时配置 AsyncLayoutFactory。对于 AppCompat 上下文,这可以通过 AsyncAppCompatFactory 提供,该工厂可正确初始化 AppCompat 视图。
  • inflate API 接受一个执行器,OnInflateFinishedListener 回调可以在其上触发。

版本 1.1.0-rc01

2025 年 3 月 26 日

androidx.asynclayoutinflater:asynclayoutinflater:1.1.0-rc01androidx.asynclayoutinflater:asynclayoutinflater-appcompat:1.1.0-rc01 已发布,自上一个 Beta 版本以来没有明显变化。版本 1.1.0-rc01 包含这些提交

版本 1.1.0-beta01

2025 年 3 月 12 日

androidx.asynclayoutinflater:asynclayoutinflater:1.1.0-beta01androidx.asynclayoutinflater:asynclayoutinflater-appcompat:1.1.0-beta01 已发布。版本 1.1.0-beta01 包含这些提交

Bug 修复

  • 此库现在使用JSpecify 空值注解,这些注解属于类型用途。Kotlin 开发者应使用以下编译器参数来强制执行正确用法:-Xjspecify-annotations=strict(从 Kotlin 编译器 2.1.0 版开始,这是默认设置)。(I32dda, b/326456246)

版本 1.1.0-alpha01

2022 年 10 月 5 日

androidx.asynclayoutinflater:asynclayoutinflater:1.1.0-alpha01androidx.asynclayoutinflater:asynclayoutinflater-appcompat:1.1.0-alpha01 已发布。版本 1.1.0-alpha01 包含这些提交。

新功能

  • 允许在初始化 AsyncLayoutInflater 时配置 AsyncLayoutFactory。对于 AppCompat 上下文,这可以通过 AsyncAppCompatFactory 提供,该工厂可正确初始化 AppCompat 视图。
  • inflate API 接受一个执行器,OnInflateFinishedListener 回调可以在其上触发。