安卓手机虚拟鼠标滚轮,鼠标滚轮事件js
墨初 知识笔记 115阅读
Override public boolean on generic monitoring event (motion event event) {//The input source is the pointing device associated with the display. //Input sources are displayable pointing devices such as mouse pointing device (mouse pointer) and stylus pointing device (stylus device). If (0! (event.getSource() InputDevice。 Source _ class _ pointer)) {switch (event. getaction ()) {//Handling wheel movement . Handling wheel event case motion event. ACTION_SCROLL: //Get the scrolling direction on the vertical coordinate, that is, the scroll wheel rolls down if (event. getaxisvaloe (motion event. AXIS _ VSCROLL)0.0f){ logutils . d(fortest :3360 ongenericmotionevent down); }//Get the rolling direction on the vertical coordinate, that is, the wheel rolls up else {logutils. i (fortest:3360 ongeneralism event up); } returns true}} returns super.onGenericMotionEvent (event); }
