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

PrimitiveResourcesKt

public final class PrimitiveResourcesKt


Summary

Public methods

static final boolean

Load a boolean resource.

static final @NonNull Dp

Load a dimension resource.

static final @NonNull int[]

Load an array of integer resource.

static final int

Load an integer resource.

Public methods

booleanResource

@Composable
public static final boolean booleanResource(@BoolRes int id)

Load a boolean resource.

Parameters
@BoolRes int id

the resource identifier

Returns
boolean

the boolean associated with the resource

dimensionResource

@Composable
public static final @NonNull Dp dimensionResource(@DimenRes int id)

Load a dimension resource.

Parameters
@DimenRes int id

the resource identifier

Returns
@NonNull Dp

the dimension value associated with the resource

integerArrayResource

@Composable
public static final @NonNull int[] integerArrayResource(@ArrayRes int id)

Load an array of integer resource.

Parameters
@ArrayRes int id

the resource identifier

Returns
@NonNull int[]

the integer array associated with the resource

integerResource

@Composable
public static final int integerResource(@IntegerRes int id)

Load an integer resource.

Parameters
@IntegerRes int id

the resource identifier

Returns
int

the integer associated with the resource