有些時(shí)候我們會(huì)遇到雙擊事件芯咧,如何設(shè)置雙擊事件驶悟。
在你的點(diǎn)擊事件里寫下一下判斷
System.arraycopy(downTuch,1,downTuch,0,downTuch.length-1);
downTuch[downTuch.length-1] = SystemClock.uptimeMillis();
//雙擊事件
if(downTuch[0] >= (SystemClock.uptimeMillis() -500)){
in.setClass(FindActivity.this ,CaptureActivity.class);
startActivityForResult(in,1);
}