Alexander Karkossa
06/02/2021, 10:02 PM1.0.0-beta08
and i found a strange issue. When i use my library, de.charlex.compose:revealswipe:1.0.0-beta04
(RevealSwipe), which implements a RevealSwipe
, i am not able to swipe the items after scrolling down in a LazyColumn
. I could fix it by setting key(myItem) {}
around the RevealSwipe
. Any ideas? In compose 1.0.0-beta06
everything worked fineAlexander Karkossa
06/02/2021, 10:03 PMSurface(modifier = Modifier.fillMaxSize()) {
LazyColumn {
items(
items = items,
key = { item -> item}
) { item ->
key(item) { //FIXME Without these key, the RevealSwipe doesn't work after scrolling
RevealSwipe(
hiddenContentEnd = {
Image(
modifier = Modifier.padding(horizontal = 25.dp),
imageVector = Icons.Outlined.Delete,
colorFilter = ColorFilter.tint(MaterialTheme.colors.onSecondary),
contentDescription = null
)
}
) {
Card(
modifier = Modifier
.fillMaxWidth()
.requiredHeight(100.dp)
,
backgroundColor = Color.Gray,
) {
Box(contentAlignment = Alignment.Center) {
Text("Item: $item")
}
}
}
}
}
}
}
Alexander Karkossa
06/02/2021, 10:04 PMAndrey Kulikov
06/02/2021, 10:15 PMAlexander Karkossa
06/02/2021, 10:24 PMAlexander Karkossa
06/02/2021, 10:26 PMDaniele Segato
12/06/2022, 11:27 PM