[Solved] Getting a value of int from edittext


I think when you run your program then edit text have no value that means it will return NULL and NULL can’t be a Integer value so you must have to check Condition Like

String editTextValue = number.getText().toString();
if(!TextUtils.isEmpty(editTextValue)){
angka = Integer.parseInt(editTextValue);
}

I hope its work for you.

3

solved Getting a value of int from edittext