You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
677 B

package org.jetbrains.compose.resources.demo.shared
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.*
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import org.jetbrains.compose.resources.*
@OptIn(ExperimentalResourceApi::class)
@Composable
internal fun UseResources() {
Column {
Text("Hello, resources")
Image(
bitmap = resource("dir/img.png").rememberImageBitmap().orEmpty(),
contentDescription = null,
)
Image(
bitmap = resource("img.webp").rememberImageBitmap().orEmpty(),
contentDescription = null,
)
}
}