This repository was archived by the owner on Oct 23, 2020. It is now read-only.
This repository was archived by the owner on Oct 23, 2020. It is now read-only.
FAM with setClosedOnTouchOutside
only closes for singleTap, not fling events etc #248
Closed
Description
I have a RecyclerView
with a FAM on top of it. If I open the menu and then do a single tap outside the menu, it closes as expected. But any other gesture is ignored, for example if I try to fling the list the nothing happens. I do not expect the fling to actually cause a RecyclerView
scroll event, but I do expect the FAM to close upon any outside touch event.
My expected behavior is what's observed in e.g. Google Inbox (except that Google Inbox also dims the RecyclerView
area upon expanding the FAM).
Note that I've successfully accomplished this with a manual touchlistener:
fabMenu.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
return fabMenu.isOpened();
} else if (event.getAction() == MotionEvent.ACTION_UP) {
if (fabMenu.isOpened()) {
fabMenu.close(fabMenu.isAnimated());
return true;
}
}
return false;
}
});
Shouldn't this be the default behaviour when using setClosedOnTouchOutside
?