title: async splashscreen to show before webview app
body: <p>i am making an android that runs a fullscreen webview but the problem is the index page appears after a 2 sec delay so i want to implement a splash screen to be displayed until the webview loads the website in the background .please if you could he me with complete code of this splash screen because i am completely new to it .</p>
  
  <p>main activity is :</p>
  
  <pre><code>public class MainActivity extends Activity  {
  </code></pre>
  
  <p>WebView website;</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.activity_main);
      website = (WebView) findViewById(R.id.website);
      website.setWebViewClient(new WebViewClient());
      WebSettings webSettings = website.getSettings();
      webSettings.setJavaScriptEnabled(true);
      website.loadUrl("http://www.fitanity.com/index2.jsp");
  
  }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
      if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; website.canGoBack()) {
          website.goBack();
          return true;
      }
      else
      {
          finish();
      }
      return super.onKeyDown(keyCode, event);
  }
  </code></pre>
  
  <p>}</p>