Thread
#compose
    AmrJyniat

    AmrJyniat

    10 months ago
    When I set 
    isError = true
     to the TextField the border's color not becomes only Red but I see it's combination of PrimaryColor and Red, any tips about the issue?
    f

    Felix Schütz

    10 months ago
    This does not happen for me. Can you show your code? What version of androidx.compose.material are you using?
    AmrJyniat

    AmrJyniat

    10 months ago
    OutlinedTextField(
        value = text,
        onValueChange = { newText -> onTextChange(newText) },
        modifier =  Modifier
        .fillMaxWidth()
        .border(
            BorderStroke(
                width = 1.dp,
                color = Purple500
            ),
            shape = RoundedCornerShape(4.dp)
        ),
        placeholder = { Text(text = hint, style = textHintStyle) },
        isError = errorResStringId != null,
        colors = TextFieldDefaults.outlinedTextFieldColors(
            errorBorderColor = Color.Red,
            focusedBorderColor = MaterialTheme.colors.secondary,
            unfocusedBorderColor = MaterialTheme.colors.secondary,
        )
    )
    Compose material version 1.0.3
    f

    Felix Schütz

    10 months ago
    You apply a border to the text field, so I think this is the additional color around the input.
    AmrJyniat

    AmrJyniat

    10 months ago
    You're right! Thanks