title: Cannot import views from xml sheet into MainActivity.java
body: <p>I've got a bunch of views in my XML sheet that I need to manipulate in my MainActivity.java file.  Here is how I am trying to do this in my MainActivity.java file:</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.CheckBox;
  import android.widget.EditText;
  import android.widget.ProgressBar;
  
  public class MainActivity extends Activity {
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  
  }
  
   EditText txt_Username = (EditText) findViewById(R.id.txtView_UserName);
   EditText txt_Password = (EditText) findViewById(R.id.txtView_Password);
   Button btn_LogIn = (Button) findViewById(R.id.button_LogIn);
   CheckBox chkbox_RememberMyPassword = (CheckBox) findViewById(R.id.checkbox_RememberPassword);
   CheckBox chkbox_LogMeInAutomatically = (CheckBox) findViewById(R.id.checkbox_LogMeInAutomatically);
   ProgressBar progressbar_LogIn = (ProgressBar) findViewById(R.id.progressBar_LogIn);
  
  }
  </code></pre>
  
  <p>This does not work, however and when I go to test this code, none of the views are even loaded. I get a blank Activity background and then it crashes.</p>
  
  <p>Am I putting my variable declarations in the right spot?  I'm confused here, I think.</p>