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
I found a much cleaner solution,which checks if the string is any type of number including integer, float, long or double.
integer
float
long
double
import java.math.BigDecimal; Boolean isNumber; try { BigDecimal n = new BigDecimal(theStingToCheck); isNumber = true; } catch (Exception e) { isNumber = false; }