Android WebView自定义捏动作

时间:2016-08-16 06:50:09

标签: android webview

我希望在我的android webview中使用pinch时字体增加/减少。

默认操作使显示更大/更小,但不是字体。

public void increaseFont(Webview webview) {
int font = wv.getSettings().getTextZoom();
int newFont = font + 15;
wwbview.getSettings().setTextZoom(newFont);
}

但是,我不确定如何将其作为捏合动作实施。

tv1 = (WebView) findViewById(R.id.tv1);
tv1.loadUrl("file:///android_res/raw/ht_1193");

tv1.getSettings().setDisplayZoomControls(false);
tv1.getSettings().setBuiltInZoomControls(true);

0 个答案:

没有答案