I set the constraint of one of my tetfields to DECIMAL, the problem is that VBK shows other unnecessary characters such as: & @ - " ' etc because it's impossible to remove VBK in touch devices i decided to check the string for these characters:
if (txtCAmount.getText().indexOf("@")==-1 && txtCAmount.getText().indexOf("&")==-1 &&
txtCAmount.getText().indexOf("$")==-1 && txtCAmount.getText().indexOf(";")==-1 &&
txtCAmount.getText().indexOf("(")==-1 && txtCAmount.getText().indexOf(")")==-1 &&
txtCAmount.getText().indexOf("/")==-1 && txtCAmount.getText().indexOf(":")==-1 &&
txtCAmount.getText().indexOf("-")==-1 && txtCAmount.getText().indexOf(",")==-1 &&
txtCAmount.getText().indexOf("!")==-1 && txtCAmount.getText().indexOf("?")==-1 &&
txtCAmount.getText().indexOf("'")==-1 && txtCAmount.getText().indexOf('"')==-1)
But the last problem is . because user can enter as many as dots he wants.
txtCAmount.getText().indexOf(".", intFirst)==-1 )' But what's the simple VKB solution? – Ali Nov 18 '12 at 10:35