ожидаемое выход
Я попробовал какой -то часть кода, но он не работает исправить
Я попробовал какой -то часть кода, но он не работает коррекли
Я попробовал какой -то часть кода, но он не работает коррекли
.
Код: Выделить всё
@Preview(showBackground = true)
@Composable
fun Xyz(
title: String = "Hello world",
subTitle: String = "How are you?",
showImage: Boolean = true
) {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically
) {
Icon(Icons.Rounded.ShoppingCart, contentDescription = null)
Column(Modifier.padding(start = dimensionResource(R.dimen.home_progress_test_in_progress_padding))) {
AnimatedVisibility(visible = title.isNotEmpty()) {
Text(text = title, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
AnimatedVisibility(visible = subTitle.isNotEmpty()) {
Text(text = subTitle, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
AnimatedVisibility(visible = showImage) {
Image(
Icons.Rounded.AccountBox,
contentDescription = null
)
}
}
}
Я пытаюсь добавить модификатор. Ошибка < /p>
Код: Выделить всё
AnimatedVisibility(
modifier = Modifier.align(End),
visible = showImage
) {
Image(
Icons.Rounded.AccountBox,
contentDescription = null
)
}
Подробнее здесь: https://stackoverflow.com/questions/762 ... ck-compose
Мобильная версия