title: Splash screen doesn't load
body: <p>Part of my project I want use a splash screen. Everything is fine with the code, but unfortunately the splash screen doesn't load at the starting.
  My manifest file is</p>
  
  <pre><code>    &lt;activity 
      android:label="@string/app_name" 
      android:name="com.example.GamePlay.SplashScreen" 
      android:configChanges="orientation|keyboardHidden"
      android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen" 
      android:screenOrientation="landscape"&gt;  &lt;/activity&gt;
  
   &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.MAIN" /&gt;
  
          &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
  
  &lt;activity
      android:name="com.example.GamePlay.Game"
      android:configChanges="orientation|keyboardHidden" 
      android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen" 
      android:screenOrientation="landscape"
      android:label="@string/app_name"&gt;&lt;/activity&gt; 
  </code></pre>
  
  <p>SplashScreen.java</p>
  
  <pre><code>public class SplashScreen extends Activity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
      setContentView(R.layout.splash_screen);
      Thread welcomeThread = new Thread() {
          int wait = 0;
          @Override
          public void run() {
              try {
                  super.run();
                  while (wait &lt; 2000) {
                      sleep(100);
                      wait += 100;}
              } catch (Exception e) {
                  System.out.println("SplashScreen()"+e.toString());
              } finally {
                  System.out.println("Final statment for run()");
              }           }       };
      welcomeThread.start();
       new AsyncTask&lt;Void, Void, Void&gt;(){
             @Override
             protected Void doInBackground(Void... params) {
                      LayoutInflater inflater = (LayoutInflater)                      SplashScreen.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      Game.cachedView = inflater.inflate(R.layout.activity_game, null, false);
                      return null;
                  }
                 @Override
                  protected void onPostExecute(Void aVoid) {
                      finish();
                      Intent intent = new Intent(getBaseContext(), Game.class);
                      intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
                      startActivity(intent);
                  }
              }.execute();
          }       }
  </code></pre>
  
  <p>Please help me to fix this problem.</p>