Android java Finding a location and tapping there
<p>So, I used this code</p>

<pre><code>   public void loadLevel(float x, float y)
   {
      if(PopUpsGone == true)
      {
          if(x &gt; 106 &amp;&amp; x &lt; 243 &amp;&amp; y &gt; 375 &amp;&amp; y &lt; 465)
           {
               Toast.makeText(getApplicationContext(), "1",
                        Toast.LENGTH_LONG).show();
           }
           if(x &gt; 7 &amp;&amp; x &lt; 215 &amp;&amp; y &gt; 83 &amp;&amp; y &lt; 245)
           {
               Toast.makeText(getApplicationContext(), "2",
                        Toast.LENGTH_LONG).show();
           }
           if(x &gt; 306 &amp;&amp; x &lt; 458 &amp;&amp; y &gt; 66 &amp;&amp; y &lt; 212)
           {
               Toast.makeText(getApplicationContext(), "3",
                        Toast.LENGTH_LONG).show();
           }
           if(x &gt; 461 &amp;&amp; x &lt; 620 &amp;&amp; y &gt; 9 &amp;&amp; y &lt; 127)
           {
               Toast.makeText(getApplicationContext(), "4",
                        Toast.LENGTH_LONG).show();
           }
      }



   }
</code></pre>

<p>To tap at certain areas, when I did it on my emulator it worked perfect but when I did it on a different phone It wouldn't work or I would have to tap a bunch of times.</p>

<p>What's the best way to tap on a certain areas for different screens</p>
