title: Using values from getX() and getY() for different resolution devices (relative scale)
body: <p>I've done some scouring for the past hour on this topic, and I have found some promising results, but none of them have done what I needed them to do. Pretty much, I am using X Y coordinates to trigger a sound, and this works great. Lets say I want to divide a screen into 8 squares, and have each square trigger a different sound. I can do this pretty easily, except there is one major problem. If I am using the X and Y values for my emulator (Which is 800x440 pixels), and then using the same program on my EVO 3D (which i believe is 960x540), the whole process is essentially ruined, because I have a portion of my screen being used, rather than the whole screen. Is there a way to use something similar to density pixels instead of true X and Y values for touchEvents? That way everything scales for each particular device. I've tried using getRawX()/Y and that doesn't seem to change anything at all; it's still pixel for pixel, rather than a relative scale, that would work for each device. Can anyone direct me to a method around this? Thanks a lot, I appreciate it!</p>
  
  <p>EDIT:
  I figured it out, thanks to some simple advice from mice. Heres what I did for those who are wondering:</p>
  
  <pre><code>    x = e.getX();
      y = e.getY();       
      DisplayMetrics gettotalY = new DisplayMetrics();
      getWindowManager().getDefaultDisplay().getMetrics(gettotalY);       
      toty = gettotaly.heightPixels;
      ym1 = (float) (toty * 0.5);     
  </code></pre>