Java – Android WebView Word Wrapping pinches and scales text content

Android WebView Word Wrapping pinches and scales text content… here is a solution to the problem.

Android WebView Word Wrapping pinches and scales text content

I’m using WebView tools to develop an e-book reader android project. I zoom the screen like a pinch, the text size on the screen is increasing, but the text overflows the screen without line breaking. How to wrap and pinch the zoom screen, is there any way to overload it to solve it? The screen has only text content. For example:

enter image description here

Solution

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

Related Problems and Solutions