I'm trying to use the follow code to produce a decimal number, but the evaluation of l divided by h (low by high) always comes out to be 0.
How can I correct this? Thanks!
EditText marketValLow = (EditText) findViewById(R.id.marketValLow);
EditText marketValHigh = (EditText) findViewById(R.id.marketValHigh);
String valLow = marketValLow.getText().toString();
String valHigh = marketValHigh.getText().toString();
int l = Integer.parseInt(valLow);
int h = Integer.parseInt(valHigh);
if (valLow.trim().equals("") || valHigh.trim().equals("")) {
Toast.makeText(CurrentMarketValue.this, "You need to enter a high AND low." + valLowIndex, Toast.LENGTH_SHORT).show();
} else if ((l / h) < .9) {
Toast.makeText(CurrentMarketValue.this, "The range between your value cannot be more than 10%." + (l / h), Toast.LENGTH_SHORT).show();
}