title: Perform click on button in Android SDK
body: <p>As soon as the layout is created I want a button to be clicked automatically and I use <code>button.performClick()</code> for that. </p>
  
  <p>The problem is that it doesn't work. It looks like I can't do that during the <code>onCreate, onStart, onResume</code> method. At what point is the button and its events created, so I can perform a click on it?</p>
  
  <p>This </p>
  
  <pre><code>@Override
  protected void onResume() {
      super.onResume();
      mybutton.performClick();
  }
  </code></pre>
  
  <p>doesn't work.</p>