what determines when a view is actually displayed?
<p>In my main activity i call setContentView in the onCreate.  Then in onResume I start a service, if it is the first time into the service it creates an alarm and stops.  I expected the layout to appear when setContentView is called but stepping through the debugger indicates that it isnt appearing until the service returns.</p>

<p>Should it display as soon as setContentView is called?</p>

<p>Edit </p>

<p>It seems that onWindowFocusChanged is not called at the start of the first Application (MAIN/LAUNCHER).
By debugging it seems that the following happens:-
MAIN onCreate - onStart - onResume (this where the service is started
SERVICE class - onStart - service returns
MAIN -onResume - onWindowsFocusChanged (the screen appears for the first time)</p>

<p>The diagrams I have seen say the activity is visbile from onStart onwards but that does not appear to be the case with the first activity.   Is there any way to force the screen into view at the opening?</p>
