root/trunk/27.WebViewTest/src/soo/webview/WebViewTest.java

리비전 96, 1.1 kB (mefour에 의해 체크인됨, 15 년 전)

--

Line 
1 package soo.webview;
2
3 import android.app.Activity;
4 import android.os.Bundle;
5 import android.webkit.WebView;
6
7 public class WebViewTest extends Activity {
8     /** Called when the activity is first created. */
9         WebView wv;
10     @Override
11     public void onCreate(Bundle savedInstanceState) {
12         super.onCreate(savedInstanceState);
13         setContentView(R.layout.main);
14        
15         wv = (WebView)findViewById(R.id.webView01);
16 //        wv.getSettings().setJavaScriptEnabled(true);
17 //        wv.loadUrl("http://www.naver.com");
18        
19 //        String html="<html><head></head><body>" +
20 //                              "Hello Android !!!<br> " +
21 //                              //"<img src='http://static.naver.com/www/u/2010/0211/nmms_183926226.jpg'/>"+
22 //                              "<img src='http://thumbview02.search.naver.com/thumbnails?type=r150&q=http://cafefiles.naver.net/20100211_115/xoeh228_1265890966106039Fq_jpg/_4_vudyzasi_xoeh228.jpg'/>"+
23 //                              "</body></html>";
24        
25         String servlet = "<html><body>"+
26                                          "<a href='android.do?name=abc'>servlet invokation</a>"+
27                                          "</body></html>";
28             wv.loadData(servlet, "text/html", "UTF-8");
29              
30     }
31 }
참고: 소스 브라우저를 사용하면서 도움이 필요하다면, TracBrowser를 참고하십시오.