Back to project page beeline.
The source code is released under:
GNU General Public License
If you think the Android project beeline listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.datag.beeline; /*from w ww . ja v a 2 s . c om*/ import java.text.DecimalFormatSymbols; import android.text.InputType; import android.text.method.DigitsKeyListener; /** * This class is a workaround for Android issue #2626 <https://code.google.com/p/android/issues/detail?id=2626> * */ public class DecimalLocaleKeyListener extends DigitsKeyListener { private final char[] acceptedCharacters = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', new DecimalFormatSymbols().getDecimalSeparator() }; @Override protected char[] getAcceptedChars() { return acceptedCharacters; } public int getInputType() { return InputType.TYPE_CLASS_NUMBER | InputType.TYPE_CLASS_TEXT; } }