Vectordrawable

渲染矢量图形。
最近更新时间 稳定版 候选版 Beta 版 Alpha 版
2022 年 4 月 20 日 1.1.0 - 1.2.0-beta01 -

声明依赖项

如需添加 VectorDrawable 的依赖项,您必须将 Google Maven 代码库添加到项目中。如需了解详情,请参阅 Google 的 Maven 代码库

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

Groovy

dependencies {
    implementation "androidx.vectordrawable:vectordrawable:1.1.0"

    /* To be able to animate properties of a VectorDrawable, add the following.  Useful for
     * illustration purposes or state changes in response to user events
     */
    implementation "androidx.vectordrawable:vectordrawable-animated:1.1.0"

    /* To use a seekable alternative for `androidx.vectordrawable:vectordrawable-animated` add the
     * following
     */
     implementation "androidx.vectordrawable:vectordrawable-seekable:1.0.0-beta01"
}

Kotlin

dependencies {
    implementation("androidx.vectordrawable:vectordrawable:1.1.0")

    /* To be able to animate properties of a VectorDrawable, add the following.  Useful for
     * illustration purposes or state changes in response to user events
     */
    implementation("androidx.vectordrawable:vectordrawable-animated:1.1.0")

    /* To use a seekable alternative for `androidx.vectordrawable:vectordrawable-animated` add the
     * following
     */
     implementation("androidx.vectordrawable:vectordrawable-seekable:1.0.0-beta01")
}

如需详细了解依赖项,请参阅添加 build 依赖项

反馈

您的反馈将帮助我们改进 Jetpack。如果您发现了新问题,或对此库有任何改进建议,请告诉我们。创建新问题前,请先查看此库中的现有问题。您可以点击星标按钮,为现有问题投票。

创建新问题

如需了解详情,请参阅问题跟踪器文档

Vectordrawable-Seekable 1.0.0

版本 1.0.0-beta01

2022 年 4 月 20 日

发布了 androidx.vectordrawable:vectordrawable-seekable:1.0.0-beta01,该版本与 1.0.0-alpha02 相比没有变化。版本 1.0.0-beta01 中包含这些提交内容

VectorDrawable-Seekable 版本 1.0.0-alpha02

2020 年 8 月 19 日

发布了 androidx.vectordrawable:vectordrawable-seekable:1.0.0-alpha02版本 1.0.0-alpha02 中包含这些提交内容

bug 修复

Vectordrawable-Seekable 版本 1.0.0-alpha01

2020 年 4 月 15 日

发布了 androidx.vectordrawable:vectordrawable-seekable:1.0.0-alpha01版本 1.0.0-alpha01 中包含这些提交内容

新功能

androidx.vectordrawable:vectordrawable-seekableandroidx.vectordrawable:vectordrawable-animated 的可查找替代项,具有一些其他功能。它支持与 AnimatedVectorDrawable 相同的 XML 格式。

  • 暂停和恢复
  • 跳转 (setCurrentPlayTime)
  • 增强型回调

如需了解详情,请参阅 SeekableAnimatedVectorDrawable

版本 1.2.0

版本 1.2.0-beta01

2022 年 4 月 20 日

发布了 androidx.vectordrawable:vectordrawable:1.2.0-beta01,该版本与 1.2.0-alpha02 相比没有变化。版本 1.2.0-beta01 中包含这些提交内容

VectorDrawable 版本 1.2.0-alpha02

2020 年 8 月 19 日

发布了 androidx.vectordrawable:vectordrawable:1.2.0-alpha02版本 1.2.0-alpha02 中包含这些提交内容

bug 修复

Vectordrawable 版本 1.2.0-alpha01

2020 年 4 月 15 日

发布了 androidx.vectordrawable:vectordrawable:1.2.0-alpha01版本 1.2.0-alpha01 中包含这些提交内容

新功能

  • 此版本没有新的公开功能。当您使用 androidx.vectordrawable:vectordrawable-seekable-1.0.0-alpha01 时,它是必要依赖项。

版本 1.1.0

版本 1.1.0

2019 年 9 月 5 日

发布了 androidx.vectordrawable:vectordrawable:1.1.0androidx.vectordrawable:vectordrawable-animated:1.1.0。点击此处可查看此版本中包含的提交内容。

自 1.0.0 以来的重要变更

新功能

  • ClipPath 现在支持 fillType
  • 现在可以通过使用 VectorDrawableCompat 中的主题背景属性定义的 ColorStateLists 支持色调调节

bug 修复

  • 修复了使用渐变呈现 VectorDrawables 时出现的错误 (b/117796719)
  • 修复了即使已设置 getColorFilter() 它仍返回 null 的问题 (aosp/762198)

版本 1.1.0-rc01

2019 年 7 月 2 日

发布了 androidx.vectordrawable:vectordrawable:1.1.0-rc01androidx.vectordrawable:vectordrawable-animated:1.1.0-rc01,这些版本与 1.1.0-beta02 相比没有变化。点击此处可查看此版本中包含的提交内容。

版本 1.1.0-beta02

2019 年 6 月 5 日

发布了 androidx.vectordrawable:vectordrawable:1.1.0-beta02androidx.vectordrawable:vectordrawable-animated:1.1.0-beta02。点击此处可查看此版本中包含的提交内容。

bug 修复

  • 更改了 vectordrawable-animated 软件包名称 (aosp/963431)

版本 1.1.0-beta01

2019 年 5 月 7 日

发布了 androidx.vectordrawable:vectordrawable:1.1.0-beta01androidx.vectordrawable:vectordrawable-animated:1.1.0-beta01。点击此处可查看此版本中包含的提交内容。

新功能

  • ClipPath 现在支持 fillType

版本 1.1.0-alpha01

2018 年 12 月 3 日

新功能

  • 通过使用 VectorDrawableCompat 中的主题背景属性定义的 ColorStateLists 支持色调调节。

bug 修复

  • 修复了使用渐变呈现 VectorDrawables 时出现的错误 (aosp/790377)
  • 修复了即使已设置 getColorFilter() 它仍返回 null 的问题 (aosp/762198)

版本 1.0.0

版本 1.0.0

2018 年 11 月 7 日

新功能