i've an issue with the webview in android 4.0, the webview is empty
with every page i try to load even if the page is loaded

here's my code

setContentView(R.layout.browser);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
webview = (WebView) findViewById(R.id.webview);
webview.setWebChromeClient(new WebChromeClient() {
                        @Override
                        public void onConsoleMessage(String message, int 
lineNumber,
                                        String sourceID) {
                                System.out.println(message);
                                super.onConsoleMessage(message, lineNumber, 
sourceID);
                        }

                        public void onProgressChanged(WebView view, int 
progress) {
                                ProgressBar p = (ProgressBar) 
findViewById(R.id.progress);
                                p.setProgress(progress);
                        }
                });

                webview.setWebViewClient(new WebViewClient() {
                        public void onReceivedError(WebView view, int errorCode,
                                        String description, String failingUrl) {
                                        Toast.makeText(getContext(), "Oh no! " 
+ description,
                                                Toast.LENGTH_SHORT).show();
                        }

                        public void onPageFinished(WebView view, String url){
                                ProgressBar p = (ProgressBar) 
findViewById(R.id.progress);
                                p.setVisibility(LinearLayout.GONE);
                        }

                        public void onPageStarted(WebView view, String url, 
Bitmap favicon)
{
                                ProgressBar p = (ProgressBar) 
findViewById(R.id.progress);
                                p.setVisibility(LinearLayout.VISIBLE);
                        }

                        public boolean shouldOverrideUrlLoading(WebView view, 
String url) {
                                
if(url.equals("http://www.beintoo.com/m/fbloginok";)){
                                        startBeintooHome();
                                        return true;
                                }
                                return super.shouldOverrideUrlLoading(view, 
url);
                        }
                });
                webview.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
                webview.getSettings().setJavaScriptEnabled(true);
                webview.setInitialScale(1);
                webview.loadUrl(openUrl);

where is the problem?

thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to