0

I used the webview in the application. When I test the application on the galaxy s3 ICS(4.0.3), it works well. But the application doesn't work well on the galaxy s4 JellyBean(4.3). It also works well on Android version 4.1.

I would like to know that does the webview depend on the android version? If the webview depend on os version, how can I do os compatibility?

EDIT:

    String webUrl = "javascript:callSizeChange('"+value+"')";
    webview.loadUrl(webUrl);

The page is

    <div id="body">     
        <div id="text" class="initSize">
            <script type="text/javascript">writeText();</script>
        </div>
    </div>

The javascript is

function callSizeChange(n) {
    $textSize=(arguments.length>0)?n:0;
    doSizeChange($textSize);
}

function writeText() {
    $value=getBodyContent();
    var val=$value||'<div class="loading"></div>';
    document.getElementById("text").innerHTML=val;
}
user1156041
  • 2,155
  • 5
  • 24
  • 54
  • How does it not work well? – Niko Feb 05 '14 at 08:22
  • There is font size change button at the action bar. When I click to change the font size. The page didn't reload on 4.3 device at once. I have to touch the webview area to reload the page. – user1156041 Feb 05 '14 at 08:28
  • Can you post the code what you run when clicking the button? – Niko Feb 05 '14 at 08:29
  • I would like to say that is os dependency problem. cos it works on other os. – user1156041 Feb 05 '14 at 08:33
  • Have you tried any workarounds like causing programmatically a touch event to the WebView? Is your webUrl public for testing? – Niko Feb 05 '14 at 08:54
  • Yes, I did the touch event. It's no ok. I have to touch again. The web page is from asset folder. The page is privacy. I am really sorry for it. – user1156041 Feb 05 '14 at 09:17
  • Any possibility you could strip the private parts of the web page and post the code here? – Niko Feb 05 '14 at 09:19
  • I found the @Ena answer from this link http://stackoverflow.com/a/15831758/1156041 – user1156041 Feb 06 '14 at 11:00

0 Answers0