Fixed text size in WebView Android (Lollipop)

Ani*_*dha 4 android webview text-size android-5.0-lollipop

I have this 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>
Run Code Online (Sandbox Code Playgroud)

How to have fixed font size of 11px? If I increase/decrease the system font-size in display settings, the above code works perfectly fine in pre-lollipop version. But in Lollipop the font size is changing. I want it to be fixed. I have attached the screen shots for the reference.

Pre-Lollipop

前棒棒糖

Lollipop

棒糖

Any help will be greatly appreciated.

P.S : Target SDK Version is 15

10*_*fer 5

我解决了这个问题。

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");
}
Run Code Online (Sandbox Code Playgroud)

http://1004lucifer.blogspot.kr/2015/05/android-webview-lollipop.html