I recently ran into a problem while creating my first game. Trying to fix the problem with different screen sizes, I also realized that you also need to worry about pixel density. I'm not too sure that everything that you draw on the screen, but you can change these sizes so that they are the same with the screen on any device. All you may need to do is add the following code to the manifest part of the manifest:
<supports-screens android:anyDensity="false"/>
This took care of my problem with different devices, I hope this works for you too!
source share