Hi I\'m a newbie in Android Programming.
I\'m trying to build an activity which includes an edittext field and a button. When user type in an
edittext
button
Since API level 1, Android provides an helper method to do just that (no need to use regex or catching exception) : TextUtils.isDigitsOnly(CharSequence str)
boolean digitsOnly = TextUtils.isDigitsOnly(editText.getText());
Note that this method returns true with empty String : Issue 24965