Fabulous
Fabulous copied to clipboard
onTouchEvent only called with MotionEvent.Action_Down
There's an error in the library right inside the onTouchEvent
method. It always jumps into the else-clause, because of this the Button is always tinted with the darkened color.
Fix:
Change return super.onTouchEvent(event);
to return true
. This notifies the system that the event was handled and thus the method can retrieve the next Action. (Like MotionEvent.ActionUp
)
Additional change that's needed:
Inside the if (event.getAction() == MotionEvent.ACTION_UP)
clause, performClick()
must be called. Otherwise setting an onClickListener
won't work (onClick won't be called).
Perfect, thanks alot