Is this sequence correct in android? I am tring to get EditText value and convert it into integer.
startTime_hour_int=Integer.parseInt(startTime_hour_edittext.getEditableText().toString());
Because my logcat throws the below error.
05-12 10:26:35.536: ERROR/AndroidRuntime(293): java.lang.NumberFormatException: unable to parse '' as integer
Can anyone tell me, how to solve this?
@Andro_Selva
If textbox startTime_hour_edittext is blank then Integer.parseInt is trying to parse “” into integer thats why you are getting NumberFormatException
so before use of
startTime_hour_int=Integer.parseInt(startTime_hour_edittext.getEditableText().toString());check condition