Applications built with sdk 3 (Android 1.5) and not having
supports-screens tag in the manifest are assumed to only be able to deal
with HVGA / mdpi screens. Android runs them in compatibility mode, and
presents "fake" screen dimensions / density to the application (HVGA,
320x480, 160 dpi). Whatever application draws at this size is then
scaled to fit the entire (larger/smaller) screen.
Applications built with sdk 4 (Android 1.6 and later) are assumed by
default to have support for real screen sizes / densities. Android
doesn't emulate HVGA, and reports real screen size / density to such
applications.
-- Kostya
02.10.2010 15:30, Martin пишет:
Hi!
I am debugging my game directly on the device (Nexus One), so the
width and height of the screen should NEVER change, am I right?
When I start
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
System.out.println(dm.widthPixels+" "+dm.heightPixels);
with android:targetSdkVersion="3" in the AndroidManifest.xml i get
different values than with android:targetSdkVersion="8".
How can this be?
Greetings, Martin
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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