1

I am trying to use the SurfaceView and the Canvas to make some draws, in my 480x800 phone, but I do not understand how this is managed, because when I display canvas size, it show 320x533 ( while my screen is 480x800 )

I tryied to use setFixedSize() on the getHolder to reset the canvas resolution, seems to work fine, but is it a correct way to do such resize ?

Another trouble is getting the touch event coordinates, while my canvas seem to be resized, to touch events are still matched against a 320x533 screen, how can I change that ?

Sigzegv
  • 27
  • 4

1 Answers1

1

Your application is running in compatibility mode. You must either target the proper API level or declare in your manifest that you support multiple densities.

Romain Guy
  • 97,993
  • 18
  • 219
  • 200