androidx.compose.ui.res
Exceptions
ResourceResolutionException |
|
Composables
booleanResource |
Load a boolean resource. |
colorResource |
Load a color resource. |
dimensionResource |
Load a dimension resource. |
fontResource |
Synchronously load an font from |
imageResource |
Load an ImageBitmap from an image resource. |
integerArrayResource |
Load an array of integer resource. |
integerResource |
Load an integer resource. |
painterResource |
Create a |
pluralStringResource |
Load a plurals resource. |
stringArrayResource |
Load a string resource. |
stringResource |
Load a string resource. |
vectorResource |
Load an ImageVector from a vector resource. |
Extension functions summary
ImageBitmap |
ImageBitmap.Companion.imageResource(res: Resources, id: @DrawableRes Int)Load an ImageBitmap from an image resource. |
ImageVector |
ImageVector.Companion.vectorResource( |
Extension functions
ImageBitmap.Companion.imageResource
fun ImageBitmap.Companion.imageResource(res: Resources, id: @DrawableRes Int): ImageBitmap
Load an ImageBitmap from an image resource.
This function is intended to be used for when low-level ImageBitmap-specific functionality is required. For simply displaying onscreen, the vector/bitmap-agnostic painterResource is recommended instead.
| Returns | |
|---|---|
ImageBitmap |
Loaded image file represented as an |
ImageVector.Companion.vectorResource
fun ImageVector.Companion.vectorResource(
theme: Resources.Theme? = null,
res: Resources,
resId: Int
): ImageVector