How do I disable the bubble? :thinking_face: Usecase: Iโ€™ve a single digit OTP input field and it do...
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.