title: Action of edittext in android
body: <p>Motivation: I want when i press enter while passing text in edittext then the work of edittext will be stopped and edittext will be invisible . My code is here </p>
  
  <pre><code>edt=(EditText) findViewById(R.id.edt);
              edt.setVisibility(View.VISIBLE);
              edt.setOnKeyListener(new View.OnKeyListener() {
  
                  @Override
                  public boolean onKey(View arg0, int arg1, KeyEvent arg2) 
                  {
                      if(arg2.getAction()==KeyEvent.KEYCODE_ENTER)
                      {
                          edt.setVisibility(View.INVISIBLE);
                      }
                      return false;
                  }
              });
  </code></pre>
  
  <p>But it is not working .What is the problem??</p>