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") }
如要進一步瞭解依附元件,請參閱新增建構依附元件一文。
意見回饋
您的意見可協助我們改善 Jetpack。如果您發現新的問題或有可改善程式庫的任何想法,歡迎告訴我們。建立新的問題之前,請先查看這個程式庫中的現有問題。只要按一下星號按鈕,即可投票給現有問題。
詳情請參閱 Issue Tracker 文件。
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 Version 1.0.0-alpha02
2020 年 8 月 19 日
androidx.vectordrawable:vectordrawable-seekable:1.0.0-alpha02
發布。1.0.0-alpha02 版包含這些修訂版本。
修正錯誤
- 更新依附元件。(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
的 Seekable 替代版本,可提供多項額外功能。該版本支援與 VectorDrawable 相同的 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 版本包含這些修訂版本。
修正錯誤
- 更新依附元件。(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
已支援色調
修正錯誤
- 修正轉譯帶有漸層的
VectorDrawables
時發生的錯誤 (b/117796719) - 修正了即使已設定仍傳回空值的
getColorFilter()
(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
發布。您可以前往這裡查看這個版本包含的修訂版本。
修正錯誤
- 變更 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
的色調
修正錯誤
- 修正轉譯帶有漸層的
VectorDrawables
時發生的錯誤 (aosp/790377) - 修正了即使已設定仍傳回空值的
getColorFilter()
(aosp/762198)
1.0.0 版本
1.0.0 版本
2018 年 11 月 7 日
新功能
VectorDrawableCompat
獲得漸層支援和ColorStateList
填滿和筆觸功能。