以下是对我有用的方法。
Note: It will only work for Double click, it can't handle single click & double click actions seperately
// Define 2 global class variables
private static long LAST_CLICK_TIME = 0;
private final int mDoubleClickInterval = 400; // Milliseconds
// Then, inside onClick method of Button
long doubleClickCurrentTime = System.currentTimeMillis();
long currentClickTime = System.currentTimeMillis();
if (currentClickTime - LAST_CLICK_TIME <= mDoubleClickInterval)
Toast.makeText(this, "Double click detected", Toast.LENGTH_SHORT).show();
LAST_CLICK_TIME = System.currentTimeMillis();
// !Warning, Single click action problem