# VectorDrawables

# VectorDrawables

[View Source](https://cs.android.com/search?q=file:com/android/build/api/dsl/VectorDrawables.kt+class:com.android.build.api.dsl.VectorDrawables)  
Added in 4.2.0  

<br />

```
interface VectorDrawables
```

<br />

*** ** * ** ***

DSL object used to configure`vector`drawable options.

## Summary

|                             ### Public functions                             |
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html) [generatedDensities](https://developer.android.com/reference/tools/gradle-api/8.12/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. |

|                                                                                    ### Public properties                                                                                     |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>?` | [generatedDensities](https://developer.android.com/reference/tools/gradle-api/8.12/com/android/build/api/dsl/VectorDrawables#generatedDensities()) Densities used when generating PNGs from vector drawables at build time.          |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`?`                                                                                                        | [useSupportLibrary](https://developer.android.com/reference/tools/gradle-api/8.12/com/android/build/api/dsl/VectorDrawables#useSupportLibrary()) Whether to use runtime support for`vector`drawables, instead of build-time support. |

## Public functions

### generatedDensities

Added in 4.2.0  

```
@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](http://developer.android.com/guide/practices/screens_support.html).  

## Public properties

### generatedDensities

Added in 4.2.0  

```
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](http://developer.android.com/guide/practices/screens_support.html).  

### useSupportLibrary

Added in 4.2.0  

```
var useSupportLibrary: Boolean?
```

Whether to use runtime support for`vector`drawables, instead of build-time support.

See[Vector Asset Studio](http://developer.android.com/tools/help/vector-asset-studio.html).