<nowiki> public TripleTapView exdends View { private tapcount; private TapCounter tc = new TapCounter(delay);
.
.
.
@override
protected onTouchEvent(MotionEvent e){
switch (e.getAction()) {
case e.ACTION_DOWN:
tc.resetCounter();
tapcount++;
break;
}
}
class TapCounter extends CountDownTimer {
.
.
.
@override
public void onFinsish(){
if(tapcount == 3){
//add code for what you want executed at 3 taps.
}
lasttapcount = 0;
}
}
} </nowiki>
Students who added this question:
Kenan Ozdamar
Sreenidhi Muralidharan