Spikey Sanju
05/31/2021, 11:21 AMTapGestures
I really see a performance issue
. Why is it happening? Is there any way optimise performance?
For ex - When I tap LazyColumn Item
it will goto details screen
. But now it takes 1s to navigate to details screen
. When remove those functions & use clickable to goto details screen it’s working fine!Spikey Sanju
05/31/2021, 11:30 AM@Composable
fun TaskItemCard(task: Task, onTap: () -> Unit, onDoubleTap: () -> Unit, onLongPress: () -> Unit) {
// Emoji + (title + category)
Row(
modifier = Modifier
.fillMaxWidth()
.pointerInput(Unit) {
detectTapGestures(
onDoubleTap = { onDoubleTap() }, // complete the task
onLongPress = { onLongPress() }, // show bottom sheet
onTap = { onTap() } // it will goto details screen
)
},
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Start
) {
// Emoji Text View
EmojiTextView(emoji = task.emoji)
}}
Spikey Sanju
05/31/2021, 11:31 AMZach Klippenstein (he/him) [MOD]
05/31/2021, 3:31 PMSpikey Sanju
05/31/2021, 3:59 PMmultiple tap gestures
inside coroutine scope it’s not working. It works only for single tap gesture
.
Filing a bug on this 👍