title: ImageView as a splash screen not working
body: <p>My android app takes some time to initialize, and I'd like to show a splash image before the loading screen appears and hide it afterwards. I searched through stackoverflow and found some solutions. I tried to follow <a href="https://www.bignerdranch.com/blog/splash-screens-the-right-way/" rel="nofollow noreferrer">this tutorial</a>, that explains how to implement a proper splash screen that starts within a splash activity, but it didn't solve my problem, because there was still a several seconds black screen between the splash screen and the loading screen (which renders from a separate thread of C++ code, and has to initialize a bunch of things before render starts, please don't ask to change that part, it's a crossplatform C++ engine). Next I experimented with a ProgressDialog <a href="https://stackoverflow.com/questions/17357226/add-the-loading-screen-in-starting-of-the-android-application">taken from here</a>, started it in onCreate of the main activity and hided when C++ part starts actual rendering, and it worked fine except not being a splash image. But the timing was exactly what I need. Then I replaced it with an ImageView and it didn't work (no image is shown).</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      //...
      mImageView = new ImageView(this);
      mImageView.setScaleType(ScaleType.FIT_XY);
      mImageView.setImageResource(R.drawable.splash_bg);
      setContentView(mImageView);
  }
  </code></pre>
  
  <p>splash_bg.png is put into res/drawable folder and shows fine from the splash activity.
  What is missing?</p>