Habeeb Habeeb - 2 months ago 7
Java Question

How to get single integer number using EditText

I have set

inputType
property of
editText
to number and
maxLength
to
1
. I have tried some options:

Here is my code:

EditText u1 = (EditText) findViewById(R.id.show_EditText);
Int check = integer.Parseint(u1.getText().toString());

Answer
if(ed != null || ed.getText().toString().equals(""))
{
Log.d("hulk","please enter value");
return;
}
Comments