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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top