title: if-else block not working properly in android
body: <p>Scenario: when the focus is lost from an EditText, I'm checking if it contains null (in the first if block).<br>
  If so, then I'll show a Toast.<br>
  In the else-if block I'm checking if the EditText doesn't contain letters.<br>
  Then I'll show a toast, but when I run the application, the Toast is shown even on a correct input.<br>
  I.e.: If I enter any letter the Toast should not be shown, it should be shown only when a null or digit/special symbol is entered. </p>
  
  <p>Here is the code</p>
  
  <pre><code>et1.setOnFocusChangeListener(new View.OnFocusChangeListener() {
  
          @Override
          public void onFocusChange(View v, boolean hasFocus) {
              // TODO Auto-generated method stub
              if(!hasFocus)
              {
                  a = et1.getText().toString();
                  if (a.equals(""))
                  {
                      Toast.makeText(getApplicationContext(), "Your entry is incorrect!!", Toast.LENGTH_LONG).show();
                  }
                  else if (!a.contains("[a-z]")||!a.contains("[A-Z]")) {
                      Toast.makeText(getApplicationContext(), "Your entry is incorrect!!", Toast.LENGTH_LONG).show();
  
                  }
                  else
                  {
                  }
  </code></pre>
  
  <p>Please help</p>