https://kotlinlang.org logo
#compose
Title
# compose
k

Kyant

09/20/2020, 1:46 AM
How to change shape for
OutlinedTextField
?
👍 1
m

Mehdi Haghgoo

09/20/2020, 2:17 AM
Use modifier. For example:
Copy code
OutlinedTextField(value = amount.value, onValueChange = {amount.value = it}, label = {Text("Amount")}, modifier = Modifier.clip(
            CutCornerShape(16.dp)))
k

Kyant

09/20/2020, 2:26 AM
But the border will also be clipped
👍 1
I want to make a rounded TextField with rounded border.
m

Mehdi Haghgoo

09/20/2020, 2:28 AM
Yeah. This is only an example. I don't think OutlinedTextField needs a shape because it has round corners by default.
k

Kyant

09/20/2020, 2:30 AM
I want 24 dp corner size 😣
👍 1
m

Mehdi Haghgoo

09/20/2020, 2:34 AM
Maybe you don't need OutlinedTextField then. Try normal TextField with border() modifier.
s

Se7eN

09/20/2020, 9:29 AM
You can use
BaseTextField
71 Views