That is intentional.  If you haven't said you support other densities than
the framework runs you in a compatibility mode to make it look like you are
on a medium density device.  By saying that you work with SDK 4, you are
also implying that you understand how to deal with densities.

On Sat, Sep 19, 2009 at 3:00 AM, lianwei <[email protected]> wrote:

>
> I got a issue with DisplayMetrics.
>
>         DisplayMetrics dm = new DisplayMetrics();
>         getWindowManager().getDefaultDisplay().getMetrics(dm);
>         Log.d("TEST", dm.widthPixels + "x" + dm.heightPixels);
>
>
> If I do not specify the <uses-sdk android:minSdkVersion="4" /> or
> <supports-screens android:anyDensity="true"></supports-screens>, then
> the value of dm.widthPixels and heightPixels is wrong on QVGA and WVGA
> screen. e.g. on QVGA, the return value is 320x427.
>
> If this is a bug on Android1.6 SDK?
>
> For chinese users, please see
> http://easyandroid.com/bbs/viewthread.php?tid=19
> >
>


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

Reply via email to