How to check if EditText has a value in Android / Java
<p>This should be simple, but I have tried if statements checking for null values and also ones checking the .length of it:</p>

<pre><code>EditText marketValLow = (EditText) findViewById(R.id.marketValLow);
            EditText marketValHigh = (EditText) findViewById(R.id.marketValHigh);
            if (marketValLow.getText().length() != 0 &amp;&amp; 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);
            }
</code></pre>

<p>But it doesn't detect nothing was entered. Any ideas?</p>

<p>Thanks!</p>
