title: While speedily clicking on item of gridview, same method has been called twice a time
body: <p>I have used grid view in my project. When I click on grid view item speedily it calls same method twice a time. But I slowly click then it works perfectly . Please help me out.in this method i call the dialog box when i click the item it open the dialog box but when i speedily click the item then dialog box open two times. What should I do to solve this</p>
  
  <pre><code>grid.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
      @Override
     public void onItemClick(AdapterView&lt;?&gt; parent, final View view, final int position, long id) {
  
      showDialog(position);
  
      }
  });
  </code></pre>