我用了這兒(https://blog.csdn.net/qq941263013/article/details/80264198)的HorizontalListView,但是沒有用他的Adapter,使用了SimpleAdapter,能夠進行顯示和點擊,但是點擊事件出現了延時,在另一個HorizontalListView的博客下也看到有人出現了同樣的問題,點擊item后出現了這樣的日志,問題可能出在:InputEventConsistencyVerifier: TouchEvent: ACTION_DOWN but pointers are already down. Probably missing ACTION_UP from previous gesture,但是這個問題我不知道怎么解決,應該在哪添加什么,求大神幫忙分析
21-03-31 11:11:16.787 26882-26882/me.f1reking.android_serialport D/InputEventConsistencyVerifier: TouchEvent: ACTION_DOWN but pointers are already down. Probably missing ACTION_UP from previous gesture.
in me.f1reking.android_serialport.HorizontalListView{aba906a V.E...... ........ 20,90-904,314 #7f0800d0 app:id/myinfoList}
0: sent at 7101091490000, MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=79.85365, y[0]=72.54907, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=7101091, downTime=7101091, deviceId=2, source=0x1002 }
-- recent events --
1: sent at 7101091490000, MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=79.85365, y[0]=72.54907, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=7101091, downTime=7101091, deviceId=2, source=0x1002 }
2: sent at 7095710827000, (unhandled) MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=517.42633, y[0]=96.509155, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=7095710, downTime=7095648, deviceId=2, source=0x1002 }
3: sent at 7095710827000, MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=517.42633, y[0]=96.509155, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=7095710, downTime=7095648, deviceId=2, source=0x1002 }
4: sent at 7095700361000, MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=517.42633, y[0]=96.509155, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=7095700, downTime=7095648, deviceId=2, source=0x1002 }
5: sent at 7095700361000, MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=517.42633, y[0]=96.509155, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=7095700, downTime=7095648, deviceId=2, source=0x1002 }
20
uj5u.com熱心網友回復:
上面的log找到了原因。是因為我底下是個imagebotton,點擊item中不是imagebutton的地方就沒這個log了,但是點擊事件有延遲的問題還是沒有解決,大佬幫幫忙謝謝uj5u.com熱心網友回復:
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/270330.html
標籤:Android
