Код: Выделить всё
@Composable
fun AsyncImageLoader(
imageUrl: String,
contentDescription: String,
modifier: Modifier = Modifier
) {
AsyncImage(
modifier = modifier,
model = ImageRequest.Builder(LocalContext.current)
.data(imageUrl)
.crossfade(true)
.build(),
contentDescription = contentDescription,
contentScale = ContentScale.Crop,
placeholder = painterResource(R.drawable.ic_launcher_foreground),
error = painterResource(R.drawable.baseline_error_outline_24)
)
}
Код: Выделить всё
Unable to create a fetcher that supports: https://cdn.watchmode.com/posters/01652190_poster_w185.jpg
Подробнее здесь: https://stackoverflow.com/questions/793 ... pports-url
Мобильная версия