Im using this code to get value from a string and then posting it after performing operation.
The problem is that after entering some value when I try to erase the entire text field it stops unexpectedly.Im using onTextChanged
method and the piece of code that Im working with is here. Also it works fine when I use a Button to submit instead on textWatcher
.
min=(EditText) findViewById(R.id.minutes);
sec=(EditText) findViewById(R.id.seconds);
millisec=(EditText) findViewById(R.id.milliseconds);
String minute = min.getText().toString();
Double min1=Double.parseDouble(minute);
min1=min1*60;
Double min2=min1*1000;
sec.setText(Double.toString(min1));
millisec.setText(Double.toString(min2));