title: how to wait for splash screen will be finished
body: <p>I want to wait for splash screen to finish his task and then to continue doing the activity.
  I think  that my error is because too many time to wait for splash screen, my splash screen is for getting some string from server and its has all that need. 
  the first class that creating and need to wait for splash screen finished  is:
  Update:</p>
  
  <pre><code>            Thread splashTread = new Thread() {
                  @Override
                  public void run() {
                      try {
                          splash  splash=(tools.splash) new splash(first.this).execute();
                          int waited = 0;
                          while(splash.running &amp;&amp; (waited&lt; getResources().getInteger(R.integer.splashTimeOut)))
                          {
                              sleep(100);
                              if(splash.running) {
                                  waited += 100;
                              }
                              // nextActivity=splash.newActivity;
                          }
                      } catch(InterruptedException e) {
                          // do nothing
                      } finally {
                          finish();
  
                      }
                  }
              };
              splashTread.start();
  </code></pre>
  
  <p>while the splash screen is ok its </p>
  
  <pre><code>  public class splash extends AsyncTask&lt;String, Void, String&gt;
  </code></pre>
  
  <p>its wrong because its create a new activity and then do the thread....</p>