List of usage examples for android.view MotionEvent BUTTON_STYLUS_SECONDARY
int BUTTON_STYLUS_SECONDARY
To view the source code for android.view MotionEvent BUTTON_STYLUS_SECONDARY.
Click Source Link
From source file:com.android.systemui.statusbar.phone.NotificationPanelView.java
private boolean isOpenQsEvent(MotionEvent event) { final int pointerCount = event.getPointerCount(); final int action = event.getActionMasked(); final boolean twoFingerDrag = action == MotionEvent.ACTION_POINTER_DOWN && pointerCount == 2; final boolean stylusButtonClickDrag = action == MotionEvent.ACTION_DOWN && (event.isButtonPressed(MotionEvent.BUTTON_STYLUS_PRIMARY) || event.isButtonPressed(MotionEvent.BUTTON_STYLUS_SECONDARY)); final boolean mouseButtonClickDrag = action == MotionEvent.ACTION_DOWN && (event.isButtonPressed(MotionEvent.BUTTON_SECONDARY) || event.isButtonPressed(MotionEvent.BUTTON_TERTIARY)); boolean isOverride = true; return twoFingerDrag || isOverride || stylusButtonClickDrag || mouseButtonClickDrag; }