向量可繪項目

算繪向量圖形。
最近更新時間 穩定版 候選版 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 1.0.0-alpha02 版本

2020 年 8 月 19 日

發布 androidx.vectordrawable:vectordrawable-seekable:1.0.0-alpha021.0.0-alpha02 版包含以下修訂項目。

修正錯誤

Vectordrawable-Seekable 1.0.0-alpha01 版本

2020 年 4 月 15 日

發布 androidx.vectordrawable:vectordrawable-seekable:1.0.0-alpha011.0.0-alpha01 版包含此連結所列的修訂項目。

新功能

androidx.vectordrawable:vectordrawable-seekableandroidx.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-alpha021.2.0-alpha02 版包含以下修訂項目。

修正錯誤

Vectordrawable 1.2.0-alpha01 版本

2020 年 4 月 15 日

發布 androidx.vectordrawable:vectordrawable:1.2.0-alpha011.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 已支援色調

修正錯誤

  • 修正轉譯帶有漸層的 VectorDrawables 時發生的錯誤 (b/117796719)
  • 修正了即使已設定仍傳回空值的 getColorFilter() (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。您可以前往這裡查看這個版本包含的修訂項目。

修正錯誤

  • 變更 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 的色調

修正錯誤

  • 修正轉譯帶有漸層的 VectorDrawables 時發生的錯誤 (aosp/790377)
  • 修正了即使已設定仍傳回空值的 getColorFilter() (aosp/762198)

1.0.0 版本

1.0.0 版本

2018 年 11 月 7 日

新功能