Fixed text size in WebView Android (Lollipop) -
i have simple code in webview
<tr><td valign='top' width='30%'><span style='font-size:11px !important;'> @label</span></td><td valign='top' width='2%'><span style='font-size:11px !important;'>:</span></td><td ><span style='font-size:11px !important;word-break:keep-all;'> @val</span></td></tr>
how have fixed font size of 11px?
if increase/decrease system font-size in display settings, above code works fine in pre-lollipop version. in lollipop font size changing. want fixed. have attached screen shots reference.
pre-lollipop
lollipop
any appreciated.
p.s : target sdk version 15
i solved this.
settings.settextzoom(100);
@override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); webview webview = (webview) findviewbyid(r.id.webview); websettings settings = webview.getsettings(); settings.setjavascriptenabled(true); if (build.version.sdk_int > build.version_codes.ice_cream_sandwich) settings.settextzoom(100); webview.loadurl("http://www.google.co.kr"); }
http://1004lucifer.blogspot.kr/2015/05/android-webview-lollipop.html