How to make a Webview responsive Android Studio IntelliJ

Do you have a website that is responsive and you pass your URL in a webview and you end up with a non Responsive website?


Then here is what to do:

First add those lines of code into your webview activity after calling the URL:

      view.getSettings().setJavaScriptEnabled(true);
        view.getSettings().setAppCacheEnabled(true);
        view.getSettings().setLoadWithOverviewMode(true);
        view.getSettings().setUseWideViewPort(true);


Those 4 lines of code will make your Webview responsive.

Video for this article coming soon. Please download our app to get notification when video come out. Clic here: https://play.google.com/store/apps/details?id=jbej90.automation.test.haitiangeek

Did you learn something ? Make a Donation by paypal clic here: https://paypal.me/jbej90?locale.x=en_US

Having questions? Talk to me via Whatsapp:

Commentaires

Posts les plus consultés de ce blog

Men kijan pou voye MINUT NATCOM-NATCOM pou ZANMIW an 3 etap

Comment partager des minutes sur natcom

Men kijan pou prete kob, minutes, lajan nan men NATCOM Ayiti