Good day! The task is to get the numeric value from the EditText and return it. I doubt if I wrote the verification of a numeric value correctly if EditText is empty. Here is the method:
private int getEditText(EditText editText){//Возвращает значение из EditText в формате int int tmp; String text = editText.getText().toString(); if (text.isEmpty()) tmp = 0; else tmp = Integer.parseInt(text); return tmp; the layout of the EditText is the value android: inputType = "number"