Unexpected spacing on new line in outlined text field compose

56 views Asked by At

Following is Screen shot of problem

Screen shot

Given is the code that is causing the issue

     OutlinedTextField(
        value = viewModel.notes.value,
        onValueChange = { viewModel.notes.value = it },
        maxLines = 2,
        minLines = 2,
        textStyle = MaterialTheme.typography.headlineMedium.copy(
            lineHeight = TextUnit(1.0F, type = TextUnitType.Sp)
        ),
        placeholder = {
            Text(
                text = "Notes (Optional)",
                style = MaterialTheme.typography.headlineMedium.copy(
                    lineHeight = TextUnit(1.0F, type = TextUnitType.Sp)
                )
            )
        },
        modifier = Modifier
            .fillMaxWidth(),
        shape = RoundedCornerShape(6.dp),
        colors = TextFieldDefaults.colors(
            unfocusedContainerColor = Color.White,
            focusedContainerColor = Color.White,
            focusedIndicatorColor = borderColor,
            unfocusedIndicatorColor = borderColor,
        )
    )

Any help would be appreciated.

0

There are 0 answers