[°³¹ß Tip] WebView ÆäÀÌÁö°¡ ·ÎµùµÇ¾úÀ»¶§ ó¸® |
|
|
![](icon/private_name/1.gif) |
8³â Àü |
WebView ÆäÀÌÁö°¡ ·ÎµùµÇ¾úÀ»¶§ ó¸®
final WebView webview = (WebView)findViewById(R.id.browser);
/* JavaScript must be enabled if you want it to work, obviously */
webview.getSettings().setJavaScriptEnabled(true);
/* WebViewClient must be set BEFORE calling loadUrl! */
webview.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url)
{
webview.loadUrl("javascript:(function() { " +
"document.getElementsByTagName('body')[0].style.color = 'red'; " +
"})()");
}
});
webview.loadUrl("http://code.google.com/android");
|
|
̵̧ : 284 |
̵̧
¸ñ·Ï
|
|