After runnning my app in emulator to run kind of program it stopped if one of my edit text box is empty which were used in calculation with another edit text boxes to display result in text view boxes and so I must enter value and if I didn't enter it will stop the running program and one of those edit text (editText1) get it value from another activity page so I must go there to put number and I want to use this editText1 "sometimes" without going to that activity
final EditText editText1 = (EditText)findViewById(R.id.editText1);
final EditText editText2 = (EditText) findViewById(R.id.editText2);
final EditText editText3 = (EditText) findViewById(R.id.editText3);
double thick = Double.valueOf(editText1.getText().toString());
double width = Double.valueOf(editText2.getText().toString());
double length = Double.valueOf(editText3.getText().toString());
// this is the equation drive that values of previous double edit text
double Weight = thick * width * length *0.9050 / 1000000 ;
double Winder_output = thick * width * 0.905 * 60 / 1000000;
// i displayed this results in Text View
textView1.setText((String.format("%.2f",Weight)+" KG"));
textView2.setText((String.format("%.2f", Winder_output)+"KG/HR"));