Clans / FloatingActionButton

Android Floating Action Button based on Material Design specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to close floating action menu on click of outside

mahidharguggilam opened this issue · comments

How to add transparent black background and collapse fab menu on click of outside the fab menu

My problem got solved
In MainActivity

final FrameLayout mInterceptorFrame = (FrameLayout) findViewById(R.id.fl_interceptor);
mInterceptorFrame.setOnTouchListener(new View.OnTouchListener() {
@OverRide
public boolean onTouch(View v, MotionEvent event) {
Log.d(TAG, "onTouch " + "");
if (fabMain.isOpened()) {
fabMain.close(true);
return true;
}
return false;
}
});

In xml above floating action menu