Stay organized with collections
Save and categorize content based on your preferences.
VectorDrawables
interface VectorDrawables
DSL object used to configure vector
drawable options.
Summary
Public functions |
@Incubating Unit |
Densities used when generating PNGs from vector drawables at build time.
|
Public properties |
MutableSet<String>? |
Densities used when generating PNGs from vector drawables at build time.
|
Boolean? |
Whether to use runtime support for vector drawables, instead of build-time support.
|
Public functions
generatedDensities
@Incubating
fun generatedDensities(vararg densities: String): Unit
Densities used when generating PNGs from vector drawables at build time. For the PNGs to be generated, minimum SDK has to be below 21.
If set to an empty collection, all special handling of vector drawables will be disabled.
See Supporting Multiple Screens.
Public properties
generatedDensities
val generatedDensities: MutableSet<String>?
Densities used when generating PNGs from vector drawables at build time. For the PNGs to be generated, minimum SDK has to be below 21.
If set to an empty collection, all special handling of vector drawables will be disabled.
See Supporting Multiple Screens.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# VectorDrawables\n===============\n\n\n```\ninterface VectorDrawables\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDSL object used to configure `vector` drawable options.\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [generatedDensities](/reference/tools/gradle-api/7.4/com/android/build/api/dsl/VectorDrawables#generatedDensities(kotlin.Array))`(vararg densities: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Densities used when generating PNGs from vector drawables at build time. |\n\n| ### Public properties ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`\u003e?` | [generatedDensities](/reference/tools/gradle-api/7.4/com/android/build/api/dsl/VectorDrawables#generatedDensities()) Densities used when generating PNGs from vector drawables at build time. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?` | [useSupportLibrary](/reference/tools/gradle-api/7.4/com/android/build/api/dsl/VectorDrawables#useSupportLibrary()) Whether to use runtime support for `vector` drawables, instead of build-time support. |\n\nPublic functions\n----------------\n\n### generatedDensities\n\n```\n@Incubating\nfun generatedDensities(vararg densities: String): Unit\n```\n\nDensities used when generating PNGs from vector drawables at build time. For the PNGs to be generated, minimum SDK has to be below 21.\n\nIf set to an empty collection, all special handling of vector drawables will be disabled.\n\nSee [Supporting Multiple Screens](http://developer.android.com/guide/practices/screens_support.html).\n\nPublic properties\n-----------------\n\n### generatedDensities\n\n```\nval generatedDensities: MutableSet\u003cString\u003e?\n```\n\nDensities used when generating PNGs from vector drawables at build time. For the PNGs to be generated, minimum SDK has to be below 21.\n\nIf set to an empty collection, all special handling of vector drawables will be disabled.\n\nSee [Supporting Multiple Screens](http://developer.android.com/guide/practices/screens_support.html). \n\n### useSupportLibrary\n\n```\nvar useSupportLibrary: Boolean?\n```\n\nWhether to use runtime support for `vector` drawables, instead of build-time support.\n\nSee [Vector Asset Studio](http://developer.android.com/tools/help/vector-asset-studio.html)."]]