0

source code in webChromeClient.class in android.

 /**
 * Tell the client that the selection has been copied or canceled.
 * @hide
 */
public void onSelectionDone(WebView view) {
}

is there any way to override that method in my project? like

WebChromeClient mWebChromeClient = new WebChromeClient() 
{
        @Override
        public void onSelectionDone(WebView view)
        {   
        }
}

thanks.

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
songtzu
  • 90
  • 2
  • 12

1 Answers1

0

Get From This

webView.setWebChromeClient(new WebChromeClient() {
            public void onProgressChanged(WebView view, int progress)
            {
                activity.setTitle("Loading...");
                activity.setProgress(progress * 100);

                if(progress == 100)
                    activity.setTitle(R.string.app_name);
            }
        });

        webView.setWebViewClient(new WebViewClient() {
            @Override
            public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
            {
            }

            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url)
            {
                view.loadUrl(url);
                return true;
            }
        });

        webView.loadUrl("http://www.google.com");
Ashok Domadiya
  • 1,124
  • 13
  • 31
  • this is different.In my case, the method is a hiden method. "/** * Tell the client that the selection has been copied or canceled. * @hide */" – songtzu Jul 05 '12 at 07:34
  • link to a similar question : http://stackoverflow.com/questions/9844320/can-i-override-a-hidden-but-public-method-and-call-its-super-method – songtzu Jul 05 '12 at 07:35