Relative Content

Tag Archive for androidkotlinandroid-jetpack-compose

DetectDragGesture Vertical Drag Issue in LazyColumn

val users = state.data.toMutableStateList() val dragAndDropListState = rememberDragAndDropListState(lazyListState) { from, to -> users.move(from, to) } LazyColumn( modifier = Modifier .fillMaxSize() .weight(1f) .pointerInput(Unit) { val initialTouchPosition = mutableStateOf(Offset.Zero) detectDragGestures( onDrag = { change, offset -> change.consume() dragAndDropListState.onDrag(offset) if (overscrollJob?.isActive == true) return@detectDragGestures dragAndDropListState .checkOverscroll() .takeIf { it != 0f } ?.let { overscrollJob = coroutineScope.launch { […]