I have a TextField with `singleLine = true` and `m...
# compose
j
I have a TextField with
singleLine = true
and
maxLines = 1
, but in the emulator I can still press keys like ENTER to create newlines, can I somehow prevent that? Or should I just filter stuff like
\n
in the valuechange?
1
Ah, onPreviewKeyEvent can filter those keys, onKeyEvent somehow doesn't
d
You can try to set the
imeAction
on the text. https://developer.android.com/jetpack/compose/text#keyboard-options