Skip to content Skip to sidebar Skip to footer

Android Webview Text Zoom For Different Screens And Os Version

Good morning guys, I've an app that is designed to work both on smartphone and tablet. When it runs on tablet I want to zoom the text of my webview to allow users to read better th

Solution 1:

We've seen similar issues to this in our app (in general, not just in WebViews).

The original Samsung Galaxy Tab incorrectly reports itself as large-hdpi. Other tablets with the same screen size (7 inches) and resolution (1024x600) correctly report themselves as large-mdpi. These "correct" tablets include the Kindle Fire, Nook Tablet, and even the Samsung Galaxy Tab 2! I would expect the HTC Flyer to do the same but haven't tried it.

In one blog post Google claimed this was a design decision made by Samsung:

http://android-developers.blogspot.co.uk/2010/09/screen-geometry-fun.html (Search for "surprise")

In another, they claimed it was a mistake:

http://android-developers.blogspot.co.uk/2011/07/new-tools-for-managing-screen-sizes.html (Search for "interesting").

Either way, the original Galaxy Tab is an exception, and this shouldn't be allowed to happen again.

I recommend going with whatever looks best on the Fire as that should work well for all 7 inch tablets except the original Galaxy Tab. If you can make it look acceptable on there too, then it's a nice bonus.

Hope that helps!

Solution 2:

Look at this : Targeting Screens from Web Apps, the viewport should help you

Solution 3:

Is it yours or somebody else's content you're showing? It may be not completely relevant but if it's yours, you can control the appearance of stuff in webview with CSS3, but again I don't know what support of CSS3 is there on your target devices.

Post a Comment for "Android Webview Text Zoom For Different Screens And Os Version"