l

    Lukasz Burcon

    1 year ago
    Hey! Wanted to implement a scrollable list that isn’t clickable when some conditions are met (eg. a snackbar is displayed). I came up with that idea:
    Column(modifier = Modifier.pointerInteropFilter {
        when (it.action) {
            ACTION_DOWN -> {
                true
            }
            else -> {
                false
            }
        }
    }
    ... some other code
    )
    But sadly that code blocks all scroll interactions. How can I intercept clicks to my buttons on a scrollable column without disabling the scroll?
    it looks like if that pointerInteropFilter stops detecting interactions after the
    ACTION_DOWN
    has been intercept or something
    Arkadii Ivanov

    Arkadii Ivanov

    1 year ago
    Maybe you should have "clickability" as part of your state?
    And then just set or not set click listeners to items