防止按钮连续点击 共通方法: public class Utils { private static long lastClickTime; public static boolean isFastDoubleClick() { long time = System.currentTimeMillis(); if ( time - lastClickTime < 500) { return true; } lastClickTime = time; return false; } } 按钮点击时
为了防止用户或者测试MM疯狂的点击某个button,写个方法防止按钮连续点击. public class Utils { private static long lastClickTime; public synchronized static boolean isFastClick() { long time = System.currentTimeMillis(); if ( time - lastClickTime < 500) { return true; } lastClickTime