I want to run my webview in android behind the splash screen and bring up the WebView once it has completed loading the page.
Bellow is an extract of the code I have:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl(url);
mWebView.setWebViewClient(new webviewclient());
}
public class webviewclient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
Currently the splash screen appears for a split second and then the WebView appears and starts loading the page.
Any suggestions on how to convert this to Asynchronous?