Hi,
I use the flowing code to get the screen resolution:
Display display = getWindowManager().getDefaultDisplay();
DisplayMetrics dm = new DisplayMetrics();
display.getMetrics(dm);
Then as I known:
dm.heightPixels is The absolute height of the display in pixels.
dm.widthPixels is The absolute width of the display in pixels.
But when I run this code on a hardware which resolution is 800x480 and
on the emulator which is WVGA800 with "Abstracted LCD density" 160. I
got dm.widthPixels 320 and dm.heightPixels 480.
Why I get this "wrong" width and height? Is this the hardware screen
resolution? If something I misunderstood, how could I get the real
size of my screen.
Thanks for help!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en