Kindle Fire Cant Fit My Webpage inside a Webview of specific size
- by Madhavan Rangarao
This is baffling to me. Please help, I could not figure it out ...
In my sample html file I have set the meta tag to be
<meta name="viewport" content="target-densitydpi=device-dpi, user-scalable=no">
to fit the webpage inside my webview of custom size say 800x600. In Android, I had to specify "target-densitydpi=device-dpi" and it did the job nicely. I tested my custom web page with nexus 7 tablet and the web page fits inside my web view correctly.
The same code does not work in Kindle Fire. Only a part of my web page is shown and even if I set the 'initial-scale=1.0' did not help.
I tried various settings programmatically but it did not help either.
webview.getSettings().setBuiltInZoomControls(true);
webview.getSettings().setSupportZoom(true);
webview.getSettings().setLoadWithOverviewMode(true);
webview.setInitialScale(1);
webview.getSettings().setUseWideViewPort(true);
Any pointers?