Android emulator queues clicks?
<p>The problem i'm facing at the moment is that the android emulator seems to queue the clicks i do on the button below. If i click in a regular speed, it's no problem what so ever. But whenever i so to say, spam-click the button, it seems that it recieves all clicks and does that number of operations. </p>

<p>Example:
The array is 5 values long, if i stand on index 5 and click on the backbutton 4 times very fast, i end up at index 1, but if i stand at index 2 and spam-clicks three times, it throws
<code>java.lang.ArrayIndexOutOfBoundsException</code></p>

<p>code as follows:</p>

<pre><code>     ButtonGoBack.setOnClickListener(new View.OnClickListener() {
           public void onClick(View view) {
             // here i set it disabled to prevent mass clicks/taps/touches. 
             ButtonGoBack.setEnabled(false);


             enumCounter--;



             temporaryValue = values[enumCounter];

             doSomething(temporaryValue);
              // hides button              
              if(enumCounter== 0)
              {
                  ButtonGoBack.setVisibility(4);
              }


           }

       });
</code></pre>

<p>100~ or so code-lines after.</p>

<pre><code>ButtonGoBack.setEnabled(true);
</code></pre>

<p>does not seem to do the trick. </p>

<p>any suggestions how to do this in a different manner?</p>
