ImageVector.Companion


Summary

Extension functions

ImageVector

Load an ImageVector from a vector resource.

android
ImageVector
ImageVector.Companion.vectorResource(
    theme: Resources.Theme?,
    res: Resources,
    resId: Int
)
android

Extension functions

vectorResource

@Composable
fun ImageVector.Companion.vectorResource(id: @DrawableRes Int): ImageVector

Load an ImageVector from a vector resource.

This function is intended to be used for when low-level ImageVector-specific functionality is required. For simply displaying onscreen, the vector/bitmap-agnostic painterResource is recommended instead.

Parameters
id: @DrawableRes Int

the resource identifier

Returns
ImageVector

the vector data associated with the resource

vectorResource

fun ImageVector.Companion.vectorResource(
    theme: Resources.Theme? = null,
    res: Resources,
    resId: Int
): ImageVector