Because you are running in density compatibility mode. And for the most part, it is far better to get the screen size by creating your view hierarchy and seeing what size the view(s) get set to. The size you get from Display is the absolute size of the physical screen, which doesn't account for screen decorations like the status bar, soft keyboard, and who knows what other things may be added on some devices in the future.
On Thu, Oct 15, 2009 at 2:07 PM, Sikus <[email protected]> wrote: > > Hi, > is there any solution how recognize screen size? I'm using > Display display = ((WindowManager) getSystemService > (Context.WINDOW_SERVICE)).getDefaultDisplay(); > int width = display.getWidth(); > Log.i("width",""+width); > but it doesn't works good. If i use HVGA in emulator it returns > 320x480 but when I use QVGA it returns me 320x427 but QVGA has > 240x320. Why? > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

