fix clickable area of FAB on pre-Lollipop devices
On pre-Lollipop devices the view bounds of the FloatingActionButton are
significantly larger (about 2x) due to how the shadow is implemented.
This causes TouchEvents that happen way outside of the actual button
(but still within the view bounds) to trigger a click, which is
inconsistent with the behaviour on post-Lollipop devices.
The change fixes this bug by hit-testing the location of the touch
event with the Rect returned by getContentRect method that represents
the size of the actual button.
Change-Id: Ic4876b513de15fe9aa622b7dd7c2fa4ab1e25309
1 file changed