I have used grid view in my project. When I click on grid view item speedily, it calls the same method twice a time. But I slowly click, then it works perfectly.
In method below I call the dialog box. When I click the item it opens the dialog box but when I speedily click the item then dialog box open two times. What should I do to solve this?
grid.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, final View view, final int position, long id) {
showDialog(position);
}
});