Android provides an interface for encapsulating browsers, allowing developers to display webpage content using their own views. Today, I have made another research. Using webview to display browser content, you can also use webviewclient to display the content you need. Ranking of Chinese women's clothing brands
The effect is as follows:
The above two figures are respectively on the home page. They are displayed when you click Java. You can see
There is no address bar on the browser. This is the content displayed using webviewclient. RelatedCodeAs follows: Renren game Q & A Network
...
Webview WV ;
@ Override
Public Void Oncreate ( Bundle Icicle ) {
Super . Oncreate ( Icicle );
Setcontentview ( R . Layout . Main );
WV = ( Webview ) Findviewbyid ( R . ID . Wv1 );
WV . Loadurl ( "Http://wangjun.easymorse.com /" );
WV . Setwebviewclient ( New Webviewclientdemo ());
}
Private Class Webviewclientdemo Extends Webviewclient {
@ Override
// Display the page in webview instead of in the default browser
Public Boolean Shouldoverrideurlloading ( Webview View , String URL ) {
View . Loadurl ( URL );
Return True ;
}
} Wind fashion Java-JavaScript mogujie.com women's clothing