title: How to implement a splash screen with a progress bar? - android
body: <p>i have a splash screen at start up. with the following coding</p>
  
  <pre><code>public class Splash extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.splash);
      Thread logoTimer = new Thread(){
          public void run(){
              try{
                  int logoTimer = 0;
                  while (logoTimer&lt;5000){
                      sleep(100);
                      logoTimer=logoTimer+100;
                       }
                  startActivity(new Intent("com.package.MAIN"));
          } catch (InterruptedException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
              finally{
                  finish();
              }
          }
      };
      logoTimer.start();
  }}
  </code></pre>
  
  <p>now i just want to add a <strong>horizontal progress bar</strong> to the above splash activity say at the bottom of the screen.. <em>so as the splash screen appears simultaneously the progress bar should load and when it finishes the next activity should appear.</em></p>
  
  <p>searched few examples on progress bar but was not able to do what i want. there were many examples for progress bar with a dialog box. but here i don't want any dialog box. i just need a plain <strong>horizontal progress bar</strong> on my splash screen.</p>
  
  <p>so can someone help me out with required coding and stuffs? pls ! :)</p>