title: Android Activity findviewbyid() is null
body: <pre><code>import android.app.Activity;
  import android.os.Bundle;
  import android.util.Log;
  import android.widget.Button;
  
  public class FileExplorerActivity extends Activity 
  {
      public static final String TAG="ricky";
      Button button;
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          button = (Button) findViewById(R.id.but);&lt;&lt;&lt;------------------
          if(button == null)
          Log.d(TAG, "FileExplorerActivity: button is null");
      }
      public FileExplorerActivity()
      {
         Log.d(TAG, "FileExplorer: constructor()");
      }
  }
  </code></pre>
  
  <p>This is a simple Activity which is brought in front by another activity using Intent</p>
  
  <pre><code>Intent openFileBrowser = new Intent(this, FileExplorerActivity.class);
  try
  {
      startActivity(openFileBrowser); 
  }
  </code></pre>
  
  <p>After running the code my LogCat file says "button is null" Why ???</p>