开发者

Webview render issues

I can't figure out the correct setting for a webview to make it fit width! I've used in my HTML the viewport metatag with device-width option. In webview I've set WideViewPort and LoadWithOverviewMode to true. I've also tried to setInitialScale to 1.0.

All these s开发者_如何学Goeem to work in a few phones with android 1.6, 2.1, 2.2 However when I upgraded to 2.2.1 it doesn't work as wanted. I have an horizontal scrolling which I don't want! With a double-tap on the webview it fits, but not automatically when loaded.

Does anyone have any idea what Google changed in Android 2.2.1 webkit?


Not got a clue what Google have done, but I've got the same problem with all my mobile sites on Android 2.2.1 (worked fine with earlier versions). Could really do with a solution for this as it's bloody annoying me and my clients.

I've tried varying the width property to see how that affects the rendering of the pages and found that in all cases the page renders incorrectly, always adding in a margin of some sort. With the width set to 320px in the viewport meta tag my Desire HD reports the page width as being 369px. I can get round the problem by setting initial-scale=1.15 but I've only checked that on my DHD and I really don't want to have to specially detect Android 2.2.1 devices to make them work correctly!

A little off topic but since updating my phone, in addition to the problem you've mentioned, the HTC weather widget no longer updates it's current location, my battery life has reduced by around 30% and my Wifi is playing up. Having said that I'm so glad they've improved the HD video recording! Wow! (not) :p

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜