0

I'm trying to use an OutlinedTextField that allows both negative & positive decimal numbers. Currently, I have this code to change the keyboard type:

keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Decimal, imeAction = ImeAction.Next)

But this only allows positive numbers decimals as you can see here:

keyboard without negative sign

I feel like I must be blind or something because I can't find this trivial thing. I've seen answers on SO where the negative sign is present when they use Number, but this is not the case for me.

EDIT: Inspired by Gabriele, I did some tests on multiple Android versions and saw that it's not consistent. With Android 5.1.1 & 9 it's not present, while it is present on Android 13. Does anyone know how to force it on all versions?

M3-n50
  • 803
  • 1
  • 13
  • 23

0 Answers0