Exactly the same wrong resolution, and dpi at 160 in all cases as expected since it is a mdpi device.

metrics    DisplayMetrics  (id=830019718568)
    density    1.0
    densityDpi    160
    heightPixels    752
    noncompatDensity    1.0
    noncompatHeightPixels    752
    noncompatScaledDensity    1.0
    noncompatWidthPixels    1238
    noncompatXdpi    160.0
    noncompatYdpi    160.0
    scaledDensity    1.0
    widthPixels    1238
    xdpi    160.0
    ydpi    160.0

Regards,

On 11/23/2012 07:37 PM, RichardC wrote:
What does android.util.DisplayMetrics:
http://developer.android.com/reference/android/util/DisplayMetrics.html

give you?


On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote:

    Hi there,

    I have an emulator instance that seems to be reporting wrong
    resolution,
    but I am not sure if it is a problem of the emulator or may be also a
    problem in an actual device with same setup since I have no one. I
    use
    this code to get the resolution:

    getWindowManager().getDefaultDisplay().getWidth()
    getWindowManager().getDefaultDisplay().getHeight()

    The emulator tries to be like a Samsung Galaxy Tablet with 10'1
    inches
    screen and 1280x800 resolution, with software buttons. The problem is
    that putting it on landscape mode (pressing ctrl+f12, you know), and
    executing my app, it reports following resolution:

    1238x752

    I would understand that 752 due these 48 pixels being reserved for
    the
    software buttons, but the 1238 has no sense at all: software
    buttons are
    put just in one position depending on device orientation, not both...

    Do you think it is just an emulator bug or may I found this
    situation on
    actual devices?

    Thanks a lot in advance,



--
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

--
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

Reply via email to