How do I disable the bubble? :thinking_face: Useca...
# compose
t
How do I disable the bubble? 🤔 Usecase: I’ve a single digit OTP input field and it doesn’t need that
plus1 4
b
Also related question, what color in TextFieldDefaults drive it's color?
t
+ @Zach Klippenstein (he/him) [MOD]
b
Sweetness. Thanks @Chris Sinco [G]
t
Copy code
val customTextSelectionColors = TextSelectionColors(
    handleColor = Color.Transparent, // 👈🏻
    backgroundColor = Color.Transparent // 👈🏻
)
CompositionLocalProvider(LocalTextSelectionColors provides customTextSelectionColors) { // 👈🏻
    var t1 by remember { mutableStateOf("") }
    OutlinedTextField(
        value = t1,
        onValueChange = { t1 = it },
        keyboardOptions = KeyboardOptions.Default.copy(
            keyboardType = KeyboardType.Number,
        )
    )
}
@Chris Sinco [G] I tried that, but the output looks like this ☝🏻
@Joseph Hawkes-Cates Is there anything am missing here?
UPDATE: I removed
android:background
from
themes.xml
and it worked! 😮 but what if i want to have that value in my
themes.xml
?
j
@theapache64 yeah, not sure. I didn’t have that issue after changing the colors to transparent but my field doesn't have a border where you would notice that.
t
Yeah yeah. I am using
OutlinedTextField
. But anyway, thanks for sharing your findings. It helped 👍
K 2
z
We don't provide a way to disable the handle, because it's a standard feature in android text input. You can always build custom text input from scratch. It's not exactly trivial, but that's something I'm hoping to work on.