How can I add colon(:) to the soft keyboard with the input type InputType.TYPE_CLASS_NUMBER
Currently I have the following code:
NumberKeyListener keyListener = new NumberKeyListener() {
public int getInputType() {
return InputType.TYPE_CLASS_NUMBER;
}
@Override
protected char[] getAcceptedChars() {
return new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', ':', '-', ',' };
}
};
mytext.setKeyListener(keyListener);
But I also like the colon(:) on the number keyboard?
In order to change the characters on a soft keyboard, you need to create a custom IME.
Android doc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With