title: android: creating method in onCreate() running in onResume()
body: <p>I've created a onClickListener in the onCreate() state.
  Once the program is running I'm in onResume() state, how come when I call the onClickListener in the onResume() state it works?</p>
  
  <p>Shouldn't there be a distinction between the states:</p>
  
  <pre><code>import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.view.View;
  import android.widget.Button;
  import android.widget.TextView;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Button myButton= (Button) findViewById(R.id.button1);
          myButton.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  TextView tv= (TextView) findViewById(R.id.textView1);
                  tv.setText("CIAO 1");
              }
          });
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>