title: Setting global Button and EditText objects
body: <p>I'm getting null pointer exceptions when I try to initialize Button and EditText objects in global scope, can't figure it out.  I've commented out everything but the bare minimum for the app to display my layout, but this still causes a crash:</p>
  
  <pre><code>private EditText addmoney = (EditText)findViewById(R.id.addmoney);
  </code></pre>
  
  <p>R.id.addmoney definitely, definitely exists.  So what the heck?  Is it impossible to declare EditText in global scope?  I need to be able to call it from both onCreate and onPause in a class extending Activity, is there maybe another way I should be doing this?</p>
  
  <p>EDIT:</p>
  
  <p>I tried using shade's method of inflating the layout first but it causes errors, apparently your not allowed to use system services before onCreate() has been called and inflating a view requires one.</p>