This should be simple, but I have tried if statements checking for null values and also ones checking the .length of it:
EditText marketValLow = (EditText) findViewById(R.id.marketValLow);
EditText marketValHigh = (EditText) findViewById(R.id.marketValHigh);
if (marketValLow.getText().length() != 0 && marketValHigh.getText().length() != 0) {
Intent intent = new Intent();
intent.setClass(v.getContext(), CurrentlyOwe.class);
startActivity(intent);
} else {
Toast.makeText(CurrentMarketValue.this, "You need to enter a high AND low.", Toast.LENGTH_SHORT);
}
But it doesn't detect nothing was entered. Any ideas?
Thanks!