See my code below. I applied the code you specified in your question and my notification bar is hidden. You won't be able to disable the notification bar for external browser applications
public class ContentBrowser extends Activity {
private LinearLayout _progressBarLayout;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.browserlayout);
Bundle receiveBundle = this.getIntent().getExtras();
initialize(receiveBundle.getString("url"));
}
@SuppressLint("SetJavaScriptEnabled")
private void initialize(String url) {
WebView webView = (WebView) findViewById(R.id.browserView);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.MEDIUM);
webView.getSettings().setDomStorageEnabled(true);
_progressBarLayout = (LinearLayout) findViewById(R.id.browserProgressLayout);
final Activity activity = this;
webView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
// Activities and WebViews measure progress with different scales.
// The progress meter will automatically disappear when we reach 100%
activity.setProgress(progress * 1000);
}
});
webView.setWebViewClient(new browserClient());
if (url != null && !"".equals(url))
webView.loadUrl(url);
}
@Override
public void onBackPressed() {
finish();
}
public class browserClient extends WebViewClient
{
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// TODO Auto-generated method stub
super.onPageStarted(view, url, favicon);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// TODO Auto-generated method stub
view.loadUrl(url);
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
super.onPageFinished(view, url);
_progressBarLayout.setVisibility(View.GONE);
}
}
}