Код: Выделить всё
fun MultiAcctCard(
configuration: Configuration,
account: Account,
onClick: (Account) -> Unit,
) {
val context = LocalContext.current
var borderColor by remember { mutableStateOf(context.getColor(R.color.transparent)) }
Card(
modifier = Modifier
.padding(top = 15.dp, start = 15.dp, end = 15.dp)
.then(
if (configuration.orientation == Configuration.ORIENTATION_LANDSCAPE)
Modifier.height(185.dp) else Modifier.wrapContentHeight()
)
.fillMaxWidth()
.clickable(
onClick = { onClick(account) }
)
.focusable(true)
.onFocusChanged {
borderColor =
if (it.isFocused) context.getColor(R.color.marigold) else context.getColor(R.color.transparent)
}
.border(width = 2.dp, color = Color(borderColor).padding(2.dp), shape = RoundedCornerShape(size = 8.dp)),
backgroundColor = Color.White,
shape = RoundedCornerShape(corner = CornerSize(7.dp))
)
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... l-keyboard
Мобильная версия