I would like to position an image of a mouse over a wallpaper containing different mouse holes. My the scale type for my wallpaper mouseHole
is set to CENTER_CROP
I am setting the X and Y positions of my mouse using the following code:
int mouseX = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, xLoc, getResources().getDisplayMetrics());
int mouseY = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, yLoc, getResources().getDisplayMetrics());
However, on two different tablets (specifically a Samsung Galaxy Tab 5 vs. an Asus ZenPad 10), the locations do not perfectly match. The wallpaper is an image with four different mouse holes, and I would like the location of the mouse to match on all tablets.
Take a look at developer guide for supporting multiple screen sizes here
TLDR: you can set in your android manifest to allow only users with the screen sizes specified in this section to be able to see and download your application. OR create different layouts for different screen sizes, it is more work but it is what you need :)