https://kotlinlang.org logo
c

Chethan

12/18/2020, 5:02 AM
How to give character limit to OutlinedTextField or TextField ?? I do not see this attribute to set
s

Saurabh Thorat

12/18/2020, 6:34 AM
Copy code
TextField(
    value = textState,
    onValueChange = { value ->
        if (value.text.length <= limit)
            textState = value
    }
)
☝️ 1
c

Chethan

12/19/2020, 7:22 AM
Thanks, I actually did in this way
6 Views