title: Android EditText onKeyUp
body: <p>Just started with android, want to figure out keyUp on edittext. I followed various tutorials on keyUp it works but only on pressing back button. I want it to work on type. Just like phonebook, as you type some event will be triggered.</p>
  
  <p>My code:</p>
  
  <pre><code>    private EditText input;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_contacts);
          addKeyListener();
      }
  
      public void addKeyListener() {
          input = (EditText) findViewById(R.id.names);
          input.setOnKeyListener(new OnKeyListener() {
              @Override
              public boolean onKey(View v, int keyCode, KeyEvent event) {
                  Toast.makeText(Contacts.this,
                          input.getText() + " you have typed", Toast.LENGTH_SHORT)
                          .show();
                  return true;
  
              }
          });
  
      }
  </code></pre>
  
  <p>Current code is only working on back button, if I press back button then the <code>Toast</code> comes.</p>