Does anyone know how to disable androidx.ui.founda...
# compose
m
Does anyone know how to disable androidx.ui.foundation.Text from being selected? I don't see any mention or properties anywhere talking about say "Disabling selection"
👍 1
v
The current workaround is to use
Modifier.longPressGestureFilter
m
I did this:
Copy code
Text(
    text = title,
    style = typography.h1,
    color = primaryColor,
    modifier = Modifier.longPressGestureFilter {
        Log.i("PageView", "Text long press")
    }
)
I saw the log but then when i did it again i saw the text selected, do i need to filter the gestures somehow
the return type is Unit?
it seems harder, but if i drag i can still select sometimes, do i need to maybe also override:
Copy code
longPressDragGestureFilter
?
m
Thanks, it seems to take care of it most of the time which is enough. 🙂
v
great to hear! 🙂