Filip Stanis
02/07/2022, 1:58 PM.replace
that works on TextFieldValue
(takes cursor / selection into account)? I'm trying to have forbidden characters (like @) in my TextField
so I'm just doing .replace("@", "")
inside onValueChange
but this means the cursor will stay on the position of the removed character (i.e. behaves like "insert" key is on). I feel this is simple to solve, but just wanted to check if there's some builtin method I'm missing.Oleksandr Balan
02/07/2022, 2:20 PMVisualTransformation
and OffsetMapping
https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/VisualTransformationFilip Stanis
02/07/2022, 3:08 PMOleksandr Balan
02/07/2022, 3:12 PMFilip Stanis
02/07/2022, 3:58 PMSiyamed
02/08/2022, 7:04 PM