I have this code:
EditText value = ( EditText )findViewById( R.id.editbox );
Integer int_value = Integer.valueOf( value.getText().toString() );
It works great when there are a number in the EditText, but it FC my application when it is empty or have text, etc.
How can I make sure that int_value have/are a number? I also tried parseInt but with the same result.
1 Answer