Question

I've been searching for hours trying to find out how to make bounds so the bitmap should not go out of the screen when I'm moving it with my buttons up,down,left,right. It should stay in the screen.

Était-ce utile?

La solution

How about this :

Get screen dimensions in pixels

and then something like this (IF you want to resize the image):

Android image on tablets and phones

This is not a complete answer to your question but the programming should be straightforward once you know the size of the screen and the size of the image.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top