android - Scale Landscape WebView to Fit Width and Height -


i have webview displays in landscape mode. displays website has been set content visible (i.e. no vertical or horizontal scrollbars) long user's resolution @ least 800 x 600. if load webview on tablet has resolution of 1024 x 600, have scroll vertically in order see whole thing (since android's built-in navigation bar @ bottom takes 48 pixels of vertical space). similarly, if load webview on phone has resolution of 640 x 360, have scroll both horizontally , vertically in order see whole thing. finally, if load webview on tablet has resolution of 1280 x 800, don't have scroll in either direction (which good), website looks small because there's space around 800 x 600 design.

how can make website scale fit on of these 3 devices? in other words, keeping in mind android's built-in navigation bar @ bottom takes 48 pixels of vertical space, tablet has resolution of 1024 x 600 should scale webview 92% 800 x 600 design fits , tablet has resolution of 1280 x 800 should scale webview 125.3% 800 x 600 design fits.

i've read using css zoom property scaling, have seen problems this. example way text gets rendered sometimes. think scaling webview natively rather css might make perform better.

you can make sure won't scroll "sideways" setting viewport meta-tag. scaling vertically fit going bad idea - layout sufficiently flexible handle every aspect ratio on every device? if want display "at bottom" used css fixed positioning instead.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -