Comparing text in EditText
<h3>My code:</h3>

<pre><code>final EditText et1 = (EditText)findViewById(R.id.et1);


        et1.setOnFocusChangeListener(new OnFocusChangeListener(){
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                if ( hasFocus )
                {
                    et1.setTextColor(0xFF000000);
                    if ( et1.getText().equals("Email") ) { et1.setText(""); }
                }
                else
                { 
                    et1.setTextColor(0xFF7F7F7F);
                    if ( et1.getText().equals("") ) { et1.setText("Email"); }
                }
            }           
        });
</code></pre>

<p>et1 has "Email" in it by default. When the user clicks on it, I want it to clear.
The <code>OnFocusChangeListener</code> works fine as the color changes, but the text does not change, i.e. the </p>

<pre><code>if ( et1.getText().equals("Email") )
</code></pre>

<p>doesn't fire. Nor does the <code>equals("")</code>, after I clear the et.</p>

<p>What am I doing wrong?</p>
