Hi guys, I'm trying to customize TextField to cent...
# compose
l
Hi guys, I'm trying to customize TextField to center its content. Everything else is okay except the cursor, i don’t know if there is a way to center it. Thanks for your help!!! 🙇
r
Probably you need a textStyle
textStyle = LocalTextStyle.current.copy(textAlign = TextAlign.Center)
l
Did it, but it looks like a bug. When I type in, both the text and the cursor will be centered, but if I leave it empty like in the photo, the cursor will be back to the start 🤷‍♂️
c
cc @Anastasia [G]
l
Hi, does anyone has an update on this?
c
This was posted on the weekend so I’d expect more responses to this later in the week 🙂
a
The proposed solution should work. If it doesn't, feel free to file a bug to the Text component with the repro sample.
l
Yes, it works. But on Android only, bug is happened on Desktop.