Final TextView Txttitle =(TextView) Findviewbyid (r.id.txttitle);Final WebView WebView =(WebView) Findviewbyid (R.id.btnwebview); Webchromeclient WVCC =NewWebchromeclient () {@OverridePublicvoidOnreceivedtitle (WebView view, String title) {Super. Onreceivedtitle (view, title); Txttitle.settext ("Receivedtitle:" +title); } };//Set Setwebchromeclient ObjectWebview.setwebchromeclient (WVCC); // Create Webviewclient object webviewclient WVC = new webviewclient () {@Override public boolean Shouldoverrideurlloading (WebView view, String URL) { // uses its own WebView component to respond to URL load events instead of loading the page with the default browser Webview.loadurl (URL); // consume this event. Return true in Android that's it, the event will not bubble pass, we call it consumption of return true;}};
Webview.setwebviewclient (WVC); }
Android WebView Gets the title of the page