Image

Functions summary

Unit
@Composable
Image(
    provider: ImageProvider,
    contentDescription: String?,
    modifier: GlanceModifier,
    contentScale: ContentScale,
    colorFilter: ColorFilter?
)

A composable which lays out and draws the image specified in provider.

Unit
@Composable
Image(
    provider: ImageProvider,
    contentDescription: String?,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float,
    modifier: GlanceModifier,
    contentScale: ContentScale,
    colorFilter: ColorFilter?
)

A composable which lays out and draws the image specified in provider.

Functions

Image

@Composable
fun Image(
    provider: ImageProvider,
    contentDescription: String?,
    modifier: GlanceModifier = GlanceModifier,
    contentScale: ContentScale = ContentScale.Fit,
    colorFilter: ColorFilter? = null
): Unit

A composable which lays out and draws the image specified in provider. This will attempt to lay out the image using the intrinsic width and height of the provided image, but this can be overridden by using a modifier to set the width or height of this element.

Parameters
provider: ImageProvider

The image provider to use to draw the image

contentDescription: String?

text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized.

modifier: GlanceModifier = GlanceModifier

Modifier used to adjust the layout algorithm or draw decoration content.

contentScale: ContentScale = ContentScale.Fit

How to lay the image out with respect to its bounds, if the bounds are smaller than the image.

colorFilter: ColorFilter? = null

The effects to use to modify the color of an image.

Image

@Composable
fun Image(
    provider: ImageProvider,
    contentDescription: String?,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float,
    modifier: GlanceModifier = GlanceModifier,
    contentScale: ContentScale = ContentScale.Fit,
    colorFilter: ColorFilter? = null
): Unit

A composable which lays out and draws the image specified in provider. This will attempt to lay out the image using the intrinsic width and height of the provided image, but this can be overridden by using a modifier to set the width or height of this element.

Parameters
provider: ImageProvider

The image provider to use to draw the image

contentDescription: String?

text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized.

alpha: @FloatRange(from = 0.0, to = 1.0) Float

Opacity (0f to 1f) to apply to the image.

modifier: GlanceModifier = GlanceModifier

Modifier used to adjust the layout algorithm or draw decoration content.

contentScale: ContentScale = ContentScale.Fit

How to lay the image out with respect to its bounds, if the bounds are smaller than the image.

colorFilter: ColorFilter? = null

The effects to use to modify the color of an image.