public class FastClickUtils {
private static final int MIN_CLICK_DELAY_TIME =2000;
private static long lastClickTime;
public static boolean isFastClick() {
boolean flag;
long curClickTime = System.currentTimeMillis();
if ((curClickTime -lastClickTime) >=MIN_CLICK_DELAY_TIME) {
flag =false;
}else{
flag =true;
}
lastClickTime = curClickTime;
return flag;
}
}
网友评论