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 methods
|
abstract Unit |
Densities used when generating PNGs from vector drawables at build time.
|
Properties
|
abstract MutableSet<String>? |
Densities used when generating PNGs from vector drawables at build time.
|
abstract Boolean? |
Whether to use runtime support for vector drawables, instead of build-time support.
|
Public methods
generatedDensities
abstract 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.
Properties
generatedDensities
abstract 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.
useSupportLibrary
abstract var useSupportLibrary: Boolean?
Whether to use runtime support for vector
drawables, instead of build-time support.
See Vector Asset Studio.
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@Incubating interface VectorDrawables\n```\n\n|------------------------------------------------|\n| [com.android.build.api.dsl.VectorDrawables](#) |\n\nDSL object used to configure `vector` drawable options.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [generatedDensities](#generatedDensities(kotlin.String))`(`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| ### Properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [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](#generatedDensities:kotlin.collections.MutableSet) Densities used when generating PNGs from vector drawables at build time. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)? | [useSupportLibrary](#useSupportLibrary:kotlin.Boolean) Whether to use runtime support for `vector` drawables, instead of build-time support. |\n\nPublic methods\n--------------\n\n### generatedDensities\n\n```\nabstract fun generatedDensities(vararg densities: String): Unit\n```\n\nDensities used when generating PNGs from vector drawables at build time. For the PNGs to be\ngenerated, minimum SDK has to be below 21.\n\nIf set to an empty collection, all special handling of vector drawables will be\ndisabled.\n\nSee\n[Supporting Multiple Screens](http://developer.android.com/guide/practices/screens_support.html).\n\nProperties\n----------\n\n### generatedDensities\n\n```\nabstract val generatedDensities: MutableSet\u003cString\u003e?\n```\n\nDensities used when generating PNGs from vector drawables at build time. For the PNGs to be\ngenerated, minimum SDK has to be below 21.\n\nIf set to an empty collection, all special handling of vector drawables will be\ndisabled.\n\nSee\n[Supporting Multiple Screens](http://developer.android.com/guide/practices/screens_support.html). \n\n### useSupportLibrary\n\n```\nabstract var 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)."]]