2

i tried to figure out a problem since this morning and just 30 Minutes ago i got it work.

My problem was the viewport beeing ignored on android KitKat. I changed my CordovaActivity.java to the new one directly from GitHub and after that my ViewPort worked the right way. If i set the values:

initial-scale=2.5, maximum-scale=2.5, minimum-scale=2.5

i can zoom in or zoom out my app to make it fit the screen. So...next step: How do i realise, that the viewport automaticaly changes to fit the screen?

If i set it the scales to 1 and set width=device-width, height=device-height nothing changes.

I would like to have a solution, which makes the app fit on every screen/device till Android 4.1. So, Devices with lower target-lvl get ignored.

This is what my Viewport looks like:

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

and this is my CordovaActivity.java -> http://pastebin.com/fYPwsMJN

I hope someone can help me and figure out, how to make it fit to every screen.

Sithys
  • 3,503
  • 8
  • 30
  • 58

1 Answers1

4

Just to double check: have you set the following in your config.xml?

<preference name="EnableViewportScale" value="true"/>
Carsten
  • 796
  • 5
  • 6
  • desktop/myapp/platforms/android/res/xml/config.xml yes desktop/myapp/config.xml yes – Sithys Oct 14 '14 at 13:59
  • Then this is probably important for you:http://stackoverflow.com/questions/2909080/android-webview-seems-to-ignore-viewport-information-on-web-pages – Carsten Oct 14 '14 at 14:54