Filtering data in EditText component in Android
dialogNric.setKeyListener(new NumberKeyListener()
{
@Override
public int getInputType()
{
return InputType.TYPE_MASK_VARIATION;
}
@Override
protected char[] getAcceptedChars()
{
return new char[]{'i','o','p','a','s','d','f','g','h','j','k','l','z','x','q','w','e','r','t','y','u','c','v','b','n','m','1','2','3','4','5','6','7','8','9','0'};
}
});