I want to detect bluetooth mouse wheel changes,and I know what’s the actionCode for mouse wheel changes,but don’t know it’s being up or down.
public boolean onGenericMotion(View v, MotionEvent event) {
if (event.getActionMasked() == MotionEvent.ACTION_SCROLL) {
//how to detect mouse wheel being up or down?
}
return false;
}
Thanks very much!
I think the answer can be found in this question: How can my view respond to a mousewheel?
I have copied the code sample from there: