I am using webview in my android application. Problem with textsize. In android 4.4, the text size id very small. But in android 5.0 or later it is very big in size. How to overcome this?
Asked
Active
Viewed 654 times
0
-
Have you tried to add style to your html content? – Oğuzhan Döngül Nov 13 '15 at 08:27
-
Thanks for reply. How to add styles? webSettings.setDefaultFontSize(20); tried this one but not working? – user2767551 Nov 13 '15 at 08:38
-
Just google "set style to html webview android" there are many ways you can use it. – Oğuzhan Döngül Nov 13 '15 at 08:43
1 Answers
0
Use the snippet
WebView webView = (WebView) findViewById(R.id.webview);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);
webView.loadUrl("file:///android_asset/your_html.html");
For setting initial zoom link

Community
- 1
- 1

Anoop M Maddasseri
- 10,213
- 3
- 52
- 73