Android coordinate system:drawing goes out of screen on smaller screen devices
===

I am creating an android app in which user can draw something on my custom view. I am saving the points from motion event and trying to redraw the path on another android device. It works fine.

But if the screen size of the second device is smaller than the first one some part of the drawing goes off the screen. 

Is there any way to fix this? 

Thanks a lot. 