3
目前我的webview有一個進度條。不過,我想刪除標題欄,當我這樣做時,我再也看不到進度條了。當我將其全屏時,我會得到相同的結果。如果全屏顯示,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");
我怎樣才能得到進度條仍然存在,當我使應用程序全屏?