I have an Image
composable Im using as a background. How can I optimise this? I know you can use the graphics layer for vectors but this is using a drawable from a png file unfortunately and is not a vector
MainScreen() {
...
scaffold() { innerPadding ->
Box(
modifier = Modifier
.padding(innerPadding)
.fillMaxSize(),
) {
val painter = painterResource(id = themeDrawableRes)
// background
Image(
painter = painter,
contentDescription = "null",
modifier = Modifier
.matchParentSize(),
contentScale = ContentScale.FillBounds
)
...
}
}
}