目前我在我的Webview中有一个进度条。然而,我想要移除标题栏,但这样做会导致我无法再看到进度条。当我将其设置为全屏时也是同样的结果。
以下是我在onCreate方法中的代码:
// Adds Progrss bar Support
this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
setContentView(R.layout.activity_main);
// Setup Webview
webView = (WebView) findViewById(R.id.webView1);
webView.setVerticalScrollBarEnabled(false);
webView.setHorizontalScrollBarEnabled(false);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
// Setting to private class for overriding redirect
// Forces the app to use the market app to open
final Activity MyActivity = this;
webView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
MyActivity.setProgress(progress * 100);
}
});
webView.setWebViewClient(new MyWebViewClient());
webView.loadUrl("http://engadget.com");
如何在将应用程序全屏时使进度条持续存在?