I have looked at the answers here - Android Preventing Double Click On A Button
and implemented qezt\'s solution like and I\'ve tried setEnabled(false) like so
I use a function like this in the listener of a button:
public static long lastClickTime = 0;
public static final long DOUBLE_CLICK_TIME_DELTA = 500;
public static boolean isDoubleClick(){
long clickTime = System.currentTimeMillis();
if(clickTime - lastClickTime < DOUBLE_CLICK_TIME_DELTA){
lastClickTime = clickTime;
return true;
}
lastClickTime = clickTime;
return false;
}