title: how to implement same action for textview and button?
body: <p>I want to have same thing happen when I press a button as I press enter on text edit(<strong>s</strong>). </p>
  
  <p>Here is implementation of <code>OnEditorActionListener</code> for text edit:</p>
  
  <pre><code> private OnEditorActionListener clickedEnter = (new OnEditorActionListener()
   {
    @Override
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
        //implemtation of task1
        }
        return false;
    }
   });        
  </code></pre>
  
  <p>And here is implementation for the button:</p>
  
  <pre><code>show.setOnClickListener(new View.OnClickListener()
          {
          @Override
          public void onClick(View v) 
          {
            //How can I call clickedEnter here?
          }
      }); 
  </code></pre>
  
  <p>The reason is, I want to have less code and easier debugging etc. Thanks in advance.</p>