Hi,
I'm trying to create a SurfaceView that covers the screen and that
does not have any scaling.
In My AndroidManifest I have
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="false" />
and in the constructor of my surfaceView I do
getHolder().setFixedSize(screenWidth, screenHeight); // 480, 800 in
my current emulator
The call I get to surfaceChanged is indeed the correct dimensions
06-22 06:37:28.889: DEBUG/AnimatorThread(690): surfaceChanged
width=480 heigth=800
But when I lock the canvas I get a canvas that is only 320, 533
06-22 06:37:28.969: DEBUG/AnimatorThread(690): Canvas[w=320, h=533]
I believe this has to do with dpi scaling. When I draw a bitmap that
is 480x800 to that canvas it will only get painted within the bounds
of the canvas (of course), and the pixels outside the canvas does not
get painter.
What can I do to get a fullscreen SurfaceView that has the same size
on the canvas as the pixel dimensions of the screen?
--
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