Wednesday 10 October 2012

Android ICS and target-densityDPI

I was debugging an interesting issue on our mobile site recently, and the problem came down to densityDpi

This attribute in the viewport meta tag for android devices is documented here: http://developer.android.com/reference/android/webkit/WebView.html

So what's the problem?

We have a little pull-down console that is included in pages whose content is mainly under the control of a third party supplier (I won't go into the complexity there).  This console would shrink down during the page load.

On Gingerbread and Jellybean, the  shrinkage would only affect the offending page, but on Icecream Sandwich, when we then navigated to another page, we would find the whole page had shrunk - and it would continue to display "zoomed out" pages until we reset the browser settings.