2

I am working on an android project , with webviews , the problem is the website is working with viewport :

<meta name="viewport" content="width=1024"/>

so my webview is created just like that:

    WebView web = new WebView(this);
    web.getSettings().setJavaScriptEnabled(true);
    web.getSettings().setUseWideViewPort(true);
    web.getSettings().setGeolocationEnabled(true);
    web.setWebViewClient(new MyWebViewClient());
    web.setWebChromeClient(new GeoWebChromeClient());
    web.loadUrl(liens.get(index).getUrl());

this is working on phones with android higher than 4.4.x , but when i use it on a samsung galaxy s4 with android 4.2.2 , nothing is changed , the webview doesn't take the viewport on consideration , but when i open the same url on google chrome for example , its working very well , means that the google chrome is taking the viewport on consideration.

what can i do to fix this probleme . please note that i can't make changes on the web site.

Nedal Jedidi
  • 119
  • 1
  • 7

0 Answers0