{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ImageVector.Companion

public static class ImageVector.Companion


Provide an empty companion object to hang platform-specific companion extensions onto.

Summary

Extension functions

static final @NonNull ImageVector

Load an ImageVector from a vector resource.

static final @NonNull ImageVector
VectorResourcesKt.vectorResource(
    @NonNull ImageVector.Companion receiver,
    Resources.Theme theme,
    @NonNull Resources res,
    int resId
)

Extension functions

VectorResourcesKt.vectorResource

@Composable
public static final @NonNull ImageVector VectorResourcesKt.vectorResource(
    @NonNull ImageVector.Companion receiver,
    @DrawableRes int id
)

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
@DrawableRes int id

the resource identifier

Returns
@NonNull ImageVector

the vector data associated with the resource

VectorResourcesKt.vectorResource

public static final @NonNull ImageVector VectorResourcesKt.vectorResource(
    @NonNull ImageVector.Companion receiver,
    Resources.Theme theme,
    @NonNull Resources res,
    int resId
)