I’ve tried using OutlinedTextField
or simple TextField
, but I found out that the padding is too large. And no matter what I did, it just wouldn’t shrink.
So I use BasicTextField
with smaller padding like this:
BasicTextField(
modifier = modifier,
value = value,
keyboardActions = keyboardActions,
keyboardOptions = keyboardOptions,
onValueChange = onValueChange,
textStyle = textStyle,
decorationBox = { innerTextField ->
if (value.isEmpty()) placeholder()
innerTextField()
}
)
But then the problem is, that when the user sets dark background, the cursor color stays black. I’ve modified the text color so that it can be readable, but cursor color is still black.
The selection color and cursor color thus is not visible.
Is there any way I can make it visible? I am using Material 1.7.2 right now.
Thank tyou