abstract activity causes findViewById() not to work
<p>I have an abstract <code>Activity</code> as most of my activities share the same menu:</p>

<pre><code>public abstract class ActivityBase extends Activity {

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menubar, menu);

        return true;
    }

    @Override
    public boolean onPrepareOptionsMenu(Menu menu) {
      //...

      return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
      //...
    }
}
</code></pre>

<p>Now, when I use that class (inherit from it), the <code>findViewById()</code> method doesn't work anymore. Doesn't matter if I even inherit from it in that particular class, once it is somewhere in the inheritance tree, it doesn't work anymore. For example:</p>

<pre><code>public class SomeOther extends ActivityBase {
}

public class Home extends Activity {

  @Override
  public void onCreate (Bundle savedInstance) {
    super.onCreate(savedInstance);
    setContentView(R.layout.main);

    Button b = (Button)findViewById(R.id.button); // fails, NullPointerException
}
</code></pre>

<p>What could be the cause of this, and even more importantly, how can I fix it?</p>
