I have tried to test 开发者_如何学Cmy app on both emulator and actual device. Both have the same screen resolution. However, when the app is tested, I found that the display of the app page height is not the same between emulator and actual device. The actual device has the shorter display length of the page. However, both returns the same viewport height $(window).height. May I know why is this happening? How can I fixed it?
I don't know your setup, you've not included what resolutions and what devices, nor any code, so it is obviously a bit guessing, but a good guess would be the screen-support.
IF your manifest doesn't include anything and you're haveing a minSdkVersion of, lets say 3 or 4, you're not supporting large screens. I don't know what the defaults are, but I know that if you have no support for large screens - like this -
<supports-screens
android:largeScreens="false"
android:smallScreens="true"
android:normalScreens="true"
android:anyDensity="false"
/>
Or maybe even default, then the Motorola Milestone reports in as being smaller. (it is 800x480 or something, but the screen is reported as the default =whatchamacall it= 5xx by 3xx)..
If you have a really big screen (the galaxy tab e.g.) you might see the sandboxing (thick black sides).
My advice: play around with the screen-support.
精彩评论