maximize window and view size
<p>my activity has a single custom view class and I'd like to make that full screen.
According to other answers I should call </p>

<pre><code>getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                     WindowManager.LayoutParams.FLAG_FULLSCREEN);
</code></pre>

<p>in Activity.onCreate but it doesn't work for me (at least in the emulator). The default size doesn't change. The only thing that worked so far is </p>

<pre><code>getWindow().setLayout(600, 400);
</code></pre>

<p>or any other fixed values. Calling setLayout with MATCH_PARENT doesn't work either (and I have tried uncounted other ways without success). 
So the question is: what is the canonical way to start a maximized activity? (somewhat like full screened in a graceful sense, that is do not hide title bars, status bars and so on).</p>

<p>Thanks in advance
Olaf</p>

<p>Edit 1:</p>

<p>This is the relevant part:</p>

<pre><code>public void onCreate(Bundle b) {
    super.onCreate(b);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(
      WindowManager.LayoutParams.FLAG_FULLSCREEN,
      WindowManager.LayoutParams.FLAG_FULLSCREEN);  
    tableView = new DrawView(this);         
    setContentView(tableView);
}
</code></pre>

<p>I readded the FEATURE_NO_TITLE flag in the above snippet 
because I didn't know that in the android world this is 
considered the default (but it is completely OK for me).
DrawView is a direct subclass of View and does not 
override onMeasure. Also there is no layout.xml.
The effect is an (expected invisible) window, 
which is far to small (or at least the contained DrawView is).
I tried with XOOM and Galaxy skins.</p>

<p>Update 2:
The issue seems not to be in the source code. I tried BitmapPixels 
from the ApiDeoms and it worked as expected (full sized window). Then I copied the source code (just one file) in a new fresh project and suddenly I got the same results: the app covers only a small portion of the screen (and one bitmap gets clipped).
I guess it has something to do with the parent activity. but I can't find any differences between the project properties of APIDemos and my test project.</p>
