I have set input type to be numberdecimal but also want to populate the editText with a \"-\" programmatically. I can add the text but then I am unable to edit the text as it do
I found a very easy solution:
editText.setKeyListener(new DigitsKeyListener(true, true));
The first true is for whether is signed input, the second true is for decimal. Hope that helps
true