Thank you!! :-)
My game worked perfekt with android:targetSdkVersion="3". I changed it
to "8" and all my Bitmaps, which I draw with canvas.drawBitmap are
cropped after this change.
I draw my Bitmaps, for example the background-bitmap like this:
canvas.drawBitmap(Global.imageBackground,
new Rect(0,0,320,480),
new
Rect(0,0,Global.screen_width,Global.screen_height), null);
The Bitmap Global.imageBackground has the dimensions 320x480.
Do all my Bitmaps get bigger, when I change the
android:targetSdkVersion to "8"?
How can I solve this problem?
Greetings, Martin
On 2 Okt., 13:50, Kostya Vasilyev <[email protected]> wrote:
> 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