listview - Android OnTouchEvent: Debugging InputEventConsistencyVerifier messages -


i have layout configured gesture listener ontouchevent(). layout contains listview , using gestures capture row id of listview. have following code -

 itemslist.setontouchlistener(new ontouchlistener() {          @override         public boolean ontouch(view arg0, motionevent evt) {             // todo auto-generated method stub             //             int action = evt.getaction();             final string debug_tag = "debug";             detector.ontouchevent(evt);             switch(action) {                 case (motionevent.action_down) :                     log.d(debug_tag,"action down");                     return true;                 case (motionevent.action_move) :                     log.d(debug_tag,"action move");                     return true;                 case (motionevent.action_up) :                     log.d(debug_tag,"action up");                     return true;                 case (motionevent.action_cancel) :                     log.d(debug_tag,"action cancel");                     return true;                 case (motionevent.action_outside) :                     log.d(debug_tag,"movement occurred outside bounds " +                             "of current screen element");                     return true;                 }               return false;         }      }); 

detector gesturedetector instance. using swipe left or swipe right actions on row of listview.

whenever swipe left / right receive 3 debug messages in logcat (information or at??).

d/inputeventconsistencyverifier(24700): touchevent: action_move contained 1 pointers  there 0 pointers down.  d/inputeventconsistencyverifier(24700):   in android.view.gesturedetector@b50cf9b0  d/inputeventconsistencyverifier(23596):   0: sent @ 37751425150760,  motionevent { action=action_move, id[0]=0, x[0]=39.00721, y[0]=28.526703, tooltype[0]=tool_type_finger,  buttonstate=0, metastate=0, flags=0x0, edgeflags=0x0, pointercount=1, historysize=1, eventtime=37751425,  downtime=37751133, deviceid=0, source=0x1002 } 

there 4 debug messages ontouchlistener -

action action move action action move action action move action action 

which corresponds swipe movement believe.

the main activity class extends ongesturelistener hence has unimplemented methods such onfling.. etc etc.

the problem onfling method called after action up event , when occurs argument passed method mevt1 null while mevt2 not null. (default behaviour?)

onfling(motionevent mevt1, motionevent mevt2, float velx, float vely)

the method uses mevt1 , hence causes nullpointexception.

i want know if debug messages inputeventconsistencyverifier of concern , if knows if problem @ all?

you have call

detector.ontouchevent(evt) 

for every action, not action_move


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -