A couple of my apps have EditText's that use DECIMAL_NUMBERS and I am able to input a negative number using -
I'm not sure why it's not working for you.
Sub tAmount_FocusChanged (HasFocus As Boolean)
If HasFocus=True Then
tAmount.SelectAll
IME.SetCustomFilter(tAmount,tAmount.INPUT_TYPE_NUMBERS,"0123456789.")
IME.ShowKeyboard(tAmount)
Else
LoadingActivity = True
tAmount.Text = u.FixDouble(tAmount.Text)
LoadingActivity = False
IME.HideKeyboard
End If
End Sub
I'm limiting what can be typed there
changing it to
B4X:
Sub tAmount_FocusChanged (HasFocus As Boolean)
If HasFocus=True Then
tAmount.SelectAll
IME.SetCustomFilter(tAmount,tAmount.INPUT_TYPE_NUMBERS,"0123456789.-")
IME.ShowKeyboard(tAmount)
Else
LoadingActivity = True
tAmount.Text = u.FixDouble(tAmount.Text)
LoadingActivity = False
IME.HideKeyboard
End If
End Sub