can you check why this code jumps to else with the conditions like e1="1", e2="2", e3=""
if (e1=="" || e2=="" || e3==""){
Context context = getApplicationContext();
CharSequence text = "Fill in all required fields!";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.setGravity(Gravity.CENTER|Gravity.CENTER, 0, 0);
toast.show();
}
else {
m=Integer.parseInt(e1);
std=Integer.parseInt(e2);
nhv=Integer.parseInt(e3);
rsl=((std*std)*((t1+t2)*(t1+t2)))/((m-nhv)*(m-nhv));
if (Math.round(rsl) < rsl) {
rsl = Math.round(rsl) +1;
}
else {
rsl=Math.round(rsl);
}
et4.setText(""+rsl);
}