How do I solve this?
It sais: "There is no applicable method to float" , maybe not right spelled...
My code is like this and the error shows on last line at "calc"
The float numbers is connected to EditText widgets.
public void CalcButton(View button) {
float no1 = Float.parseFloat(fp.getText().toString());
float no2 = Float.parseFloat(fC.getText().toString());
float no3 = Float.parseFloat(drive.getText().toString());
float calc = (no1*no2)*no3;
totalcost.setText(calc);
}
It sais: "There is no applicable method to float" , maybe not right spelled...
My code is like this and the error shows on last line at "calc"
The float numbers is connected to EditText widgets.
public void CalcButton(View button) {
float no1 = Float.parseFloat(fp.getText().toString());
float no2 = Float.parseFloat(fC.getText().toString());
float no3 = Float.parseFloat(drive.getText().toString());
float calc = (no1*no2)*no3;
totalcost.setText(calc);
}