如何跟踪谷歌电视上的鼠标movment [英] How to track mouse movment on Google TV
问题描述
我用的是索尼谷歌电视。如果我点击触控板,它会火onTouchEvent。但是,如果我只在触摸板上滑动(即:移动的箭头),我没有看到任何onTouchEvent,既不onTrackBall事件。
有关方式任何提示跟踪触摸板/鼠标movment?
I use a sony google tv. If I click on the trackpad, it'll fire a onTouchEvent. But if I only slide on the touchpad (ie: moving the arrow), i dont see any onTouchEvent, neither onTrackBall event. Any hints about the way to track the touchpad/mouse movment?
问候,
帕特里克
Regards, Patrick
推荐答案
您需要使用onGenericMotionEvent。 <一href=\"http://developer.android.com/intl/fr/reference/android/view/View.html#onGenericMotionEvent(android.view.MotionEvent\" rel=\"nofollow\">http://developer.android.com/intl/fr/reference/android/view/View.html#onGenericMotionEvent(android.view.MotionEvent)
You need to use onGenericMotionEvent. http://developer.android.com/intl/fr/reference/android/view/View.html#onGenericMotionEvent(android.view.MotionEvent)
您还可以添加OnGenericMotionEventListener。
You can also add an OnGenericMotionEventListener.
这篇关于如何跟踪谷歌电视上的鼠标movment的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!