Stay organized with collections
Save and categorize content based on your preferences.
VectorDrawables
@Incubating interface VectorDrawables
DSL object used to configure vector
drawable options.
Summary
Public functions |
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
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# VectorDrawables\n===============\n\n\n```\n@Incubating interface 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| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [generatedDensities](/reference/tools/gradle-api/7.2/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.2/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.2/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```\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```\nval 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)."]]