filipegoncalves
03/02/2023, 11:15 AMHorizontalPager
. The looping was achieved by setting the capacity of the list as Int.MAX_SIZE
but then when testing the app using keyboard and moving the focus to the items below this list, the app crashes with an ANR. The same thing happens with a normal list ( not a horizontalPager
). Anyone has any idea about what the issue could be ?mgrazianodecastro
03/02/2023, 12:39 PMHorizontalPagerIndicator
?filipegoncalves
03/02/2023, 12:40 PMshikasd
03/04/2023, 2:15 PMfilipegoncalves
03/06/2023, 11:47 AMshikasd
03/06/2023, 3:01 PMfilipegoncalves
03/06/2023, 3:02 PMRalston Da Silva
03/06/2023, 11:21 PMLazyRow(modifier = Modifier.size(200.dp)) {
items(Int.MAX_VALUE) {
FocusableText("${it % 5}")
}
}
where FocuableText is
@Composable
fun FocusableText(text: String) {
var color by remember { mutableStateOf(Black) }
Text(
modifier = Modifier
.onFocusChanged { color = if (it.isFocused) Green else Black }
.focusable()
text = text,
color = color
)
}
Pedro Agostinho
03/08/2023, 6:56 PMfilipegoncalves
03/08/2023, 6:58 PM