OutlinedTextField having too much space when trailingIcon is added. How to wrap its text as wrap content(Android compose)?

28 Views Asked by At

When I add OutlinedTextField with trailingIcon, unnecessary space is added in between, I don't want this to be added. I am using the below code.

OutlinedTextField(
        // Eg (CH) +41
        value = "Text value",
        modifier = modifier
            .focusable(false)
            .clickable {
                showDialog.value = true
            },
        enabled = false,
        onValueChange = {},
        shape = RoundedCornerShape(16.dp),
        singleLine = true,
        trailingIcon = {
            Icon(
                imageVector = Icons.Default.ArrowDropDown,
                contentDescription = "DropDown"
            )
        }
    )

Image

I want its text to be wrapped and not add unnecessary space.

0

There are 0 best solutions below