title: To load splash screen till webview is loaded
body: <p>Created an android app in which I have a website loaded through webview. I have made my splash screen to load for 5 seconds and have put progress bar in between so that the time taken by the website to load is adjusted. </p>
  
  <p>Now I need to display the splash screen till the page is loaded and have decided to remove the progress bar page. I am working with the following code.</p>
  
  <pre><code>public class Splashscreen extends Activity {
  
  // Set Duration of the Splash Screen
  long Delay = 5000;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      // Remove the Title Bar
      requestWindowFeature(Window.FEATURE_NO_TITLE);
  
      // Get the view from splash_activity.xml
      setContentView(R.layout.splash);
  
      // Create a Timer
      Timer RunSplash = new Timer();
  
      // Task to do when the timer ends
      TimerTask ShowSplash = new TimerTask() {
          @Override
          public void run() {
              // Close SplashScreenActivity.class
              finish();
  
              // Start MainActivity.class
              Intent myIntent = new Intent(Splashscreen.this,
                      MainActivity.class);
              startActivity(myIntent);
          }
      };
  
      // Start the timer
      RunSplash.schedule(ShowSplash, Delay);
  }
  }
  </code></pre>
  
  <p>Where should I make the change ?</p>