Is there an alternative way to deal with dpi density with a given density in Android 4.4 webview? (PhoneGap)

I recently ran into this issue on cross-platform mobile phone apps where target dpi density is no longer supported in Android 4.4 and this poses major issues for my existing apps in terms of layouts.

Phonegap app with the following meta information having target-densitydpi = device-dpi layout fits perfectly in venue 7 running Android 4.3

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-     scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

      

When the same was deployed to place 8 running android 4.4, the console gives a warning not supporting dpi with target density. Also the layout comes out of the screen.

I have verified the issue with this article .

As I understand it, CSS pixels are not equivalent to device pixels in this case and hence the problem. And the android team also asks for the perfect Pixel UI as an alternative

Reference 1 - Viewport target-densitydpi is no longer supported

Link 2 - Pixel Perfect UI

I also tried the solution outlined here

which also didn't give the expected result.

It would be great if there was a way to get the target-densitydpi = device-dpi property through some workarounds. Is there a way?

+3


source to share





All Articles