Code example for Gesture

Methods: getLength

0
        public void onGesture(GestureOverlayView overlay, MotionEvent event) {
        } 
 
        public void onGestureEnded(GestureOverlayView overlay, MotionEvent event) {
            mGesture = overlay.getGesture();
            if (mGesture.getLength() < LENGTH_THRESHOLD) {
                overlay.clear(false);
            } 
            mDoneButton.setEnabled(true);
        } 
 
        public void onGestureCancelled(GestureOverlayView overlay, MotionEvent event) {
        } 
    } 
 
    public void pickShortcut(View v) {
        Bundle bundle = new Bundle();
 
        ArrayList<String> shortcutNames = new ArrayList<String>();
        shortcutNames.add(getString(R.string.group_applications));
Experience pair programming with AI  Get Codota for Java