@Test public void testDoubleClick_Opens() { TestItemDetails doc = mDetailsLookup.initAt(11); mInputDelegate.onDoubleTap(CLICK); mActivationCallbacks.assertActivated(doc); }
@Override public boolean onDoubleTap(@NonNull MotionEvent e) { mHandledTapUp = false; if (!mDetailsLookup.overItemWithSelectionKey(e)) { if (DEBUG) Log.d(TAG, "Ignoring DoubleTap on non-model-backed item."); return false; } if (MotionEvents.isTertiaryMouseButtonPressed(e)) { if (DEBUG) Log.d(TAG, "Ignoring middle click"); return false; } ItemDetails<K> item = mDetailsLookup.getItemDetails(e); return (item != null) && mOnItemActivatedListener.onItemActivated(item, e); }
MouseInputHandler extends MotionInputHandler<K> { @Override public boolean onDoubleTap(@NonNull MotionEvent e) { mHandledTapUp = false; if (!mDetailsLookup.overItemWithSelectionKey(e)) { if (DEBUG) Log.d(TAG, "Ignoring DoubleTap on non-model-backed item."); return false; } if (MotionEvents.isTertiaryMouseButtonPressed(e)) { if (DEBUG) Log.d(TAG, "Ignoring middle click"); return false; } ItemDetails<K> item = mDetailsLookup.getItemDetails(e); return (item != null) && mOnItemActivatedListener.onItemActivated(item, e); } }
MouseInputHandler extends MotionInputHandler<K> { @Override public boolean onDoubleTap(@NonNull MotionEvent e) { mHandledTapUp = false; if (!mDetailsLookup.overItemWithSelectionKey(e)) { if (DEBUG) Log.d(TAG, "Ignoring DoubleTap on non-model-backed item."); return false; } if (MotionEvents.isTertiaryMouseButtonPressed(e)) { if (DEBUG) Log.d(TAG, "Ignoring middle click"); return false; } ItemDetails<K> item = mDetailsLookup.getItemDetails(e); return (item != null) && mOnItemActivatedListener.onItemActivated(item, e); } MouseInputHandler(
            @NonNull SelectionTracker<K> selectionTracker,
            @NonNull ItemKeyProvider<K> keyProvider,
            @NonNull ItemDetailsLookup<K> detailsLookup,
            @NonNull OnContextClickListener onContextClickListener,
            @NonNull OnItemActivatedListener<K> onItemActivatedListener,
            @NonNull FocusDelegate<K> focusDelegate); }
MouseInputHandler extends MotionInputHandler<K> { @Override public boolean onDoubleTap(@NonNull MotionEvent e) { mHandledTapUp = false; if (!mDetailsLookup.overItemWithSelectionKey(e)) { if (DEBUG) Log.d(TAG, "Ignoring DoubleTap on non-model-backed item."); return false; } if (MotionEvents.isTertiaryMouseButtonPressed(e)) { if (DEBUG) Log.d(TAG, "Ignoring middle click"); return false; } ItemDetails<K> item = mDetailsLookup.getItemDetails(e); return (item != null) && mOnItemActivatedListener.onItemActivated(item, e); } MouseInputHandler(
            @NonNull SelectionTracker<K> selectionTracker,
            @NonNull ItemKeyProvider<K> keyProvider,
            @NonNull ItemDetailsLookup<K> detailsLookup,
            @NonNull OnContextClickListener onContextClickListener,
            @NonNull OnItemActivatedListener<K> onItemActivatedListener,
            @NonNull FocusDelegate<K> focusDelegate); @Override boolean onDown(@NonNull MotionEvent e); @Override boolean onScroll(@NonNull MotionEvent e1, @NonNull MotionEvent e2,
            float distanceX, float distanceY); @Override boolean onSingleTapUp(@NonNull MotionEvent e); @Override boolean onSingleTapConfirmed(@NonNull MotionEvent e); @Override boolean onDoubleTap(@NonNull MotionEvent e); }
MouseInputHandler extends MotionInputHandler<K> { @Override public boolean onDoubleTap(@NonNull MotionEvent e) { mHandledTapUp = false; if (!mDetailsLookup.overItemWithSelectionKey(e)) { if (DEBUG) Log.d(TAG, "Ignoring DoubleTap on non-model-backed item."); return false; } if (MotionEvents.isTertiaryMouseButtonPressed(e)) { if (DEBUG) Log.d(TAG, "Ignoring middle click"); return false; } ItemDetails<K> item = mDetailsLookup.getItemDetails(e); return (item != null) && mOnItemActivatedListener.onItemActivated(item, e); } MouseInputHandler(
            @NonNull SelectionTracker<K> selectionTracker,
            @NonNull ItemKeyProvider<K> keyProvider,
            @NonNull ItemDetailsLookup<K> detailsLookup,
            @NonNull OnContextClickListener onContextClickListener,
            @NonNull OnItemActivatedListener<K> onItemActivatedListener,
            @NonNull FocusDelegate<K> focusDelegate); @Override boolean onDown(@NonNull MotionEvent e); @Override boolean onScroll(@NonNull MotionEvent e1, @NonNull MotionEvent e2,
            float distanceX, float distanceY); @Override boolean onSingleTapUp(@NonNull MotionEvent e); @Override boolean onSingleTapConfirmed(@NonNull MotionEvent e); @Override boolean onDoubleTap(@NonNull MotionEvent e);  }