Android - Comma as decimal separator on Numeric Keyboard
问题 We need to have a numeric keyboard for an EditText . The Keyboard should have decimal separator based on the device's selected locale. We implemented this by setting the custom DigitsKeyListener to the EditText public class NumericDigitsKeyListener extends DigitsKeyListener { @Override protected char[] getAcceptedChars() { char[] acceptedCharacters = null; acceptedCharacters = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', new DecimalFormatSymbols(Locale.getDefaultLocale())