WebView 相关设置

WebView 相关设置

1.字体大小

synchronized void
setTextSize(WebSettings.TextSize t)

Set the text size of the page.

2.缩放比例

void
setSupportZoom(boolean support)

Set whether the WebView supports zoom

void
setInitialScale(int scaleInPercent)

Set the initial scale for the WebView.

boolean
zoomIn()

Perform zoom in in the webview

boolean
zoomOut()

Perform zoom out in the webview

3.缩放控件

void
setBuiltInZoomControls(boolean enabled)

Sets whether the zoom mechanism built into WebView is used.

4.JavaScript支持

synchronized void
setJavaScriptEnabled(boolean flag)

Tell the WebView to enable javascript execution.

你可能感兴趣的:(WebView 相关设置)