public class WebViewActivity extends Activity {
private WebView webResetPwd;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// this.requestWindowFeature(Window.FEATURE_NO_TITLE);//取消標題
setContentView(R.layout.xxx);
wv= (WebView)findViewById(R.id. wv1);
wv.setWebViewClient(new WebViewClient(){});
webResetPwd.loadUrl("http://baidu.com");
WebSettings websetting = wv.getSettings();
websetting.setJavaScriptEnabled(true);
/*縮放頁面方式1.
webResetPwd.setInitialScale(110);
*/
/*縮放頁面方式2. 會出現放大縮小的按鈕
websetting.setSupportZoom(true);
websetting.setBuiltInZoomControls(true);
*/
/*縮小頁面方式3.
websetting.setDefaultZoom(WebSettings.ZoomDensity.FAR);
*/
/*縮放頁面方式4.
websetting.setUseWideViewPort(true);
websetting.setLoadWithOverviewMode(true);
*/
/*縮放頁面方式5. 會將頁面元素在一列中顯示出來
websetting.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
*/
}
}