Android wear - how to capture touch events

前端 未结 2 1638
情话喂你
情话喂你 2021-01-24 12:24

I want to capture the touch events on Android wear (I am using Samsung Gear Live) to draw the trajectory of touch. I tried to capture onTouch event and onGenericMotionEvent even

相关标签:
2条回答
  • 2021-01-24 13:01

    If you want to debug offline you can get the touch co-ordinates from adb:-

    adb shell getevent
    
    0 讨论(0)
  • 2021-01-24 13:02

    Can you try using only:

    container.setOnTouchListener(new View.OnTouchListener() {
    

    and return true from there? You need to inform the View you consumed the event.

    0 讨论(0)
提交回复
热议问题