edittext validation
<p>I have following small block of code to set validation on edit text when a button is pressed and display the validation message in a dialog.</p>

<p><strong>Java Code</strong> </p>

<pre><code>setContentView(R.layout.addnewcontacts);
            Button buttonSave = (Button) findViewById(R.id.buttonSave);
            final EditText editTextName = (EditText) findViewById(R.id.editTextName);
            buttonSave.setOnClickListener(new View.OnClickListener() {

                @Override
                public void onClick(View arg0) {
                    if (editTextName.getText().toString().length() == 0) {
                        editTextName.setError( "First name is required!" );

                    }
                }
            });
        }
</code></pre>

<p>Code is working fine but the popup is not displaying text in it.</p>

<p><strong>Screen shot :</strong></p>

<p><img src="http://i.stack.imgur.com/rRguF.png" alt="enter image description here"></p>

<p>Why popup is not showing text?</p>
