How do I modify this code below so that when a user double taps on the screen the apps/puzzle restarts? any help is much appreciated.
return true; } public boolean onTouchEvent( MotionEvent event ) { detector.onTouchEvent( event ); return true; } private class DoubleTapHandler extends GestureDetector.SimpleOnGestureListener { public boolean onDoubleTapEvent( MotionEvent event ) { int touchY = ( int ) event.getRawY( ); // y coordinate of the touch within puzzleView is // touchY - actionBarHeight - statusBarHeight int index = puzzleView.indexOfTextView( touchY - actionBarHeight - statusBarHeight ); if( puzzleView.getTextViewText( index ) .equals( puzzle.wordToChange( ) ) ) puzzleView.setTextViewText( index, puzzle.replacementWord( ) ); return true; } } }