Ameer Amjed
03/22/2025, 12:03 PMfun Modifier.disableSplitMotionEvents() =
pointerInput(Unit) {
coroutineScope {
var currentId: Long = -1L
awaitPointerEventScope {
while (true) {
awaitPointerEvent(PointerEventPass.Initial).changes.forEach { pointerInfo ->
when {
pointerInfo.pressed && currentId == -1L -> currentId = pointerInfo.id.value
pointerInfo.pressed.not() && currentId == pointerInfo.id.value -> currentId = -1
pointerInfo.id.value != currentId && currentId != -1L -> pointerInfo.consume()
else -> Unit
}
}
}
}
}
}
but not workAmeer Amjed
03/22/2025, 12:04 PMAmeer Amjed
03/22/2025, 12:48 PM<item name="android:splitMotionEvents">false</item>
<item name="android:windowEnableSplitTouch">false</item>
Also, these lines are not working.Zach Klippenstein (he/him) [MOD]
03/22/2025, 1:04 PM