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.