I wanted to create a ListView that cannot scroll and I found a great deal of help from discussions here and here. If I understood correctly the trick is to ignore all MotionEvent.ACTION_MOVE events.
This works perfectly, the only issue I have is, my objects in ListView change their background based on their state.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/button_selected" android:state_pressed="true" />
<item android:drawable="@drawable/button_selected" android:state_focused="true" />
</selector>
Now there is a scenario where user wants to press an item in ListView, but then changes his mind and moves his finger out of the view. The item he was pressing on still stays selected. I tried clearing their pressed state when handling Move event, but I guess I have to considering something else as well.
if (actionMasked == MotionEvent.ACTION_MOVE) {
setPressed(false);
return true;
}