Vectordrawable
最新更新 | 稳定版 | 发布候选版 | Beta 版 | Alpha 版 |
---|---|---|---|---|
2024 年 5 月 1 日 | 1.2.0 | - | - | - |
声明依赖项
要添加 VectorDrawable 依赖项,您必须将 Google Maven 仓库添加到您的项目中。如需了解更多信息,请阅读Google 的 Maven 仓库。
在您应用或模块的 build.gradle
文件中添加所需工件的依赖项
Groovy
dependencies { implementation "androidx.vectordrawable:vectordrawable:1.2.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.2.0" /* To use a seekable alternative for `androidx.vectordrawable:vectordrawable-animated` add the * following */ implementation "androidx.vectordrawable:vectordrawable-seekable:1.0.0" }
Kotlin
dependencies { implementation("androidx.vectordrawable:vectordrawable:1.2.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.2.0") /* To use a seekable alternative for `androidx.vectordrawable:vectordrawable-animated` add the * following */ implementation("androidx.vectordrawable:vectordrawable-seekable:1.0.0") }
如需了解有关依赖项的更多信息,请参阅添加构建依赖项。
反馈
您的反馈有助于改进 Jetpack。如果您发现新问题或有改进此库的建议,请告诉我们。在创建新问题之前,请查看此库中的现有问题。您可以通过点击星标按钮,为现有问题投票。
如需了解更多信息,请参阅问题跟踪器文档。
Vectordrawable-Seekable 1.0.0
版本 1.0.0
2024 年 5 月 1 日
androidx.vectordrawable:vectordrawable-seekable:1.0.0
已发布。版本 1.0.0 包含这些提交。
1.0.0 的主要功能
androidx.vectordrawable:vectordrawable-seekable
是 androidx.vectordrawable:vectordrawable-animated
的可查找替代方案,并带有一些额外功能。它支持与 AnimatedVectorDrawable
相同的 XML 格式。
- 暂停和恢复
- 查找 (setCurrentPlayTime)
- 增强的回调
有关详细信息,请参阅 SeekableAnimatedVectorDrawable
。
版本 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 修复
- 更新依赖项。( aosp/1380259)
Vectordrawable-Seekable 版本 1.0.0-alpha01
2020 年 4 月 15 日
androidx.vectordrawable:vectordrawable-seekable:1.0.0-alpha01
已发布。版本 1.0.0-alpha01 包含这些提交。
新功能
androidx.vectordrawable:vectordrawable-seekable
是 androidx.vectordrawable:vectordrawable-animated
的可查找替代方案,并带有一些额外功能。它支持与 AnimatedVectorDrawable 相同的 XML 格式。
- 暂停和恢复
- 查找 (setCurrentPlayTime)
- 增强的回调
有关详细信息,请参阅 SeekableAnimatedVectorDrawable。
版本 1.2.0
版本 1.2.0
2024 年 5 月 1 日
androidx.vectordrawable:vectordrawable:1.2.0
和 androidx.vectordrawable:vectordrawable-animated:1.2.0
已发布。版本 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 修复
- 更新依赖项。( aosp/1380259)
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.0
和 androidx.vectordrawable:vectordrawable-animated:1.1.0
已发布。此版本中包含的提交可在此处找到。
自 1.0.0 以来的重要更改
新功能
ClipPath
中现已支持fillType
- 现在支持在
VectorDrawableCompat
中使用通过主题属性定义的ColorStateLists
进行着色
Bug 修复
- 修复了渲染带渐变的
VectorDrawables
时出现的 bug (b/117796719) - 修复了
getColorFilter()
在已设置时仍返回 null 的 bug (aosp/762198)
版本 1.1.0-rc01
2019 年 7 月 2 日
androidx.vectordrawable:vectordrawable:1.1.0-rc01
和 androidx.vectordrawable:vectordrawable-animated:1.1.0-rc01
已发布,与 1.1.0-beta02
相比没有更改。此版本中包含的提交可在此处找到。
版本 1.1.0-beta02
2019 年 6 月 5 日
androidx.vectordrawable:vectordrawable:1.1.0-beta02
和 androidx.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-beta01
和 androidx.vectordrawable:vectordrawable-animated:1.1.0-beta01
已发布。此版本中包含的提交可在此处找到。
新功能
ClipPath
中现已支持fillType
版本 1.1.0-alpha01
2018 年 12 月 3 日
新功能
- 支持在
VectorDrawableCompat
中使用通过主题属性定义的ColorStateLists
进行着色。
Bug 修复
- 修复了渲染带渐变的
VectorDrawables
时出现的 bug (aosp/790377) - 修复了
getColorFilter()
在已设置时仍返回 null 的 bug (aosp/762198)
版本 1.0.0
版本 1.0.0
2018 年 11 月 7 日
新功能
VectorDrawableCompat
现已支持渐变以及ColorStateList
填充和描边。