Currently I have a progress bar for my webview. However I would like to remove the titlebar and when I do this I no longer can see the progress bar. I get the same results when I make it full screen.
Here is my code in my 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");
How can I get the progress bar to persist when I make the app full screen?
Well basically here is the answer to your question
Android: The progress bar in the window's title does not display
taken from the link above:
If you use Theme.NoTitleBar (which is basically what you’re trying to do) the title bar will not be shown and since the progress bar is in the title bar it won’t be shown either.
And also some hints on the usage of the NO_TITLE can be found here http://www.vogella.com/blog/2011/02/28/android-hidding-the-status-and-title-bar/
And just a thought perhaps you want to use the
ProgressDialoginstead and it will be possible to use your NO_TITLE decoration with it.hope it answers your question abit.
thanks