Note that there are some explanatory texts on larger screens.

plurals
  1. POwhen app launched default layout first flashes before my app sets content view
    text
    copied!<p>I am making an app which has architecture like this </p> <p>there are two activities </p> <p>a) BaseActivity </p> <p>b) MainActivity </p> <p>BaseActivity extends Activity </p> <p>and </p> <p>mainActivity extends BaseActivity </p> <p>now </p> <pre><code>public class MainActivity extends BaseActivity { onCreate(Bundle SavedInstance) { super.OnCreate(SavedInstance) setContentView(R.Layout.screen_main) } } </code></pre> <p>and </p> <pre><code>public class BaseActivity extends Activity { onCreate(Bundle SavedInstance) { super.OnCreate(SavedInstance) //not doing anything else in on create } } </code></pre> <p>now when i launch the app MainActivity is called how ever before the app sets content view to <code>R.Layout.screen_main</code> for like a frustrating 2 secs it first flashes a white screen with tittle and then it executes <code>setContentView(R.Layout.screen_main);</code></p> <p>I have a feeling it sets content view to a default layout from android while the app is processing in the super.<code>OnCreate</code> in case of most apps instead it shows a black screen without any tittlebar of the app however in my app it first shows a default android layout of white screen and tittle bar and then it loads my layout so my question is </p> <p>why so and what should i do so that the first thing the app does of all other things is it sets my layout so that that when we launch the app it shows my view and does not first show white screen with tittle even a blank black screen instaed of this screen will do </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload