mercredi 28 octobre 2015

findout if numeric editText is filled out or not

I have a editText named countOfProduct(Number editText type, when user want to insert into this, just numbers of keyborad display) and an if in which i want to see that end user insert a number or not. I googled and find many solutions, but none of them worked for me. here is my if

                  if(!countOfProduct.getText().toString().equals("") ||
                    !countOfProduct.getText().toString().matches("")||
                    !countOfProduct.getText().toString().matches(null) ||
                    !countOfProduct.getText().toString().equals(null) ||
                    !countOfProduct.getText().toString().isEmpty() ||
                    !countOfProduct.getText().equals(null) ||
                    (countOfProduct.getText().length() ==0) ||
                    (countOfProduct.getText().toString().length() ==0))

what should i do?

Aucun commentaire:

Enregistrer un commentaire