title: Setting the value of an Android TextView when I click a button
body: <p>In Java, if I want to set the value of a <code>JLabel</code> when I click a <code>JButton</code>, I can code it like this...</p>
  
  <pre><code>JButton button = new JButton("add");
  JButton label = new JLabel();
  
  public void addListenersToButtons(){
      button.addActionListener(this);
  }
  
  public void actionPerformed(ActionEvent e) {
      Object src = e.getSource();
      if (src == button) {
          label.setText("this is the number = " + number);
      }
  }
  </code></pre>
  
  <p>I want to be able to do a similar thing in Android, where I set the value of a <code>TextField</code> when the user clicks a button. What is the appropriate code for this in Android?</p>