Thread
#compose
    Kyant

    Kyant

    2 years ago
    How to change shape for
    OutlinedTextField
    ?
    Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    Use modifier. For example:
    OutlinedTextField(value = amount.value, onValueChange = {amount.value = it}, label = {Text("Amount")}, modifier = Modifier.clip(
                CutCornerShape(16.dp)))
    Kyant

    Kyant

    2 years ago
    But the border will also be clipped
    I want to make a rounded TextField with rounded border.
    Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    Yeah. This is only an example. I don't think OutlinedTextField needs a shape because it has round corners by default.
    Kyant

    Kyant

    2 years ago
    I want 24 dp corner size 😣
    Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    Maybe you don't need OutlinedTextField then. Try normal TextField with border() modifier.
    s

    Se7eN

    2 years ago
    You can use
    BaseTextField
    d

    Denis Ismailaj

    1 year ago
    But an OutlinedTextField makes the floating label interrupt the border, and animates the border gap opening. Using a regular TextField with border wouldn’t have this, so it would make sense for OutlinedTextField to have a shape attribute. Also, you can set shape for OutlinedButton, so it is expectable for OutlinedTextField to have it too.