I am using OutlinedTextField.
- The placeholder should be placed in the center of the TextField.
- The cursor should be positioned in front of the placeholder when the placeholder is visible.
- When the placeholder is not visible, the cursor should be located behind the entered text.
OutlinedTextField(
~~~
textStyle = TextStyle(
textAlign = TextAlign.~~
),
placeholder = {
Text(~~~)
}
)
When I write code like above, the cursor position is visible from the position I set as textAlign. Overlapped with placeholder.
How can I solve this? Do I need to use BasicTextField?
It seems that the cursor position can be changed using the selection of TextFieldValue.Thread
But I'm not sure how to position it before the placeholder.