title: connecting 2 layouts to activity
body: <p>I am completely new to android, I am trying to develop a simple music player. </p>
  
  <p>The app should start with a welcome screen with animation that stay till the <code>onCreate</code> function loop the device to load all the music to the playlist. </p>
  
  <p>I tried to achieve this using 2 <code>layouts</code> and connected them to the <code>activity</code>, but only the second one appear, before the loop finishes nothing is shown other than a white <code>blank screen</code>.</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.welcome_layout);
          loading_img = (ImageView)findViewById(R.id.loading_view);
          final Animation animatable = AnimationUtils.loadAnimation(this, R.anim.welcome_screen_anim);
          loading_img.setAnimation(animatable);
          long i;
          for(i = 0; i &lt; 1000000000; i++);// just a sample
  
          setContentView(R.layout.activity_main);
  }
  </code></pre>