When using touch input on Android, I am able to get the coordinates of the location in my view where the user pressed, using OnTouchListener. With a mouse connected, this same listener can be used to capture mousemovement, but it requires the left mouse button to be held down.
Is there any listener that sends a message when the mouse cursor moves over my view, without any buttons pressed? I didn’t find anything obvious like OnMouseCursorListener or similar, but it seems such basic functionality I think I’m missing something.
Starting from android 4.0 you can receive events for hover with a mouse via: View.setOnHoverListener().
Check http://developer.android.com/sdk/android-4.0.html
in the section “Hover events”.
Direct link: http://developer.android.com/reference/android/view/View.OnHoverListener.html