FloatingActionButton icon indicating copy to clipboard operation
FloatingActionButton copied to clipboard

Menu hides touch events

Open toSilence opened this issue 9 years ago • 12 comments

Hi,

the FloatingActionMenu hides the touch events for underlying Views even if the Menu is closed.

Is there any setting to bubble up the touch events?

Any help appreciated Thx

toSilence avatar May 17 '16 07:05 toSilence

Hi I have also same problem, is there any solution?

crescent7272 avatar Jun 15 '16 09:06 crescent7272

Hi, yes, i finally used following order:

<LinearLayout>
<android.support.design.widget.CoordinatorLayout>
<View behind FloatingActionButton>
<FloatingActionButton>
</android.support.design.widget.CoordinatorLayout>
<other stuff>
</LinearLayout>

toSilence avatar Jun 15 '16 20:06 toSilence

You saved my life thanks!!! For those who want to align bottom their fab menu button, can use android:layout_gravity="end|bottom" in coordinator layout.

crescent7272 avatar Jun 17 '16 06:06 crescent7272

@toSilence I'm facing the same problem and I can't get my head around your solution. I use a ListView with FloatingActionMenu on top, all inside a CoordinatorLayout. So in your snippet, what exactly is <other stuff> - can it be a ListView? Then it will overlay the FAM, right? And why a LinearLayout? Would appreciate if you could post the actual layout you're using to solve the problem. Thanks!

Egorand avatar Jun 22 '16 08:06 Egorand

Hi, The is from my example. It could be any view. And it's maybe not needed in your case. No in my case, the will be at the bottom of the FAM (no overlay). With the LinearLayout (vertical) the will be at the bottom.

toSilence avatar Jun 27 '16 14:06 toSilence

I don't know where to set but I think the library uses visibility constant INVISIBLE and that should be replaced with GONE look here in FloatingActionMenu.java

public void hideMenu(final boolean animate) {
        if (!isMenuHidden() && !mIsMenuButtonAnimationRunning) {
            mIsMenuButtonAnimationRunning = true;
            if (isOpened()) {
                close(animate);
                mUiHandler.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        if (animate) {
                            startAnimation(mMenuButtonHideAnimation);
                        }
                        setVisibility(INVISIBLE);
                        mIsMenuButtonAnimationRunning = false;
                    }
                }, mAnimationDelayPerItem * mButtonsCount);
            } else {
                if (animate) {
                    startAnimation(mMenuButtonHideAnimation);
                }
                setVisibility(INVISIBLE);
                mIsMenuButtonAnimationRunning = false;
            }
        }
    }

ahmadalibaloch avatar Jun 29 '16 10:06 ahmadalibaloch

It seems that changing to android:clickable="false" worked.

aviadmini avatar Jul 10 '16 23:07 aviadmini

I had the same problem and in my case it was happening because of the android:fillAfter="true" property in my hide animation xml file. After removing it worked.

ivorcho avatar Jul 13 '16 10:07 ivorcho

changing the width and height of the FloatingActionMenu to "match_parent" fixed it for me.

alaindesigns avatar Jul 25 '16 14:07 alaindesigns

i'm still having this issue can any one help me. i'v tried all the above solutions and no one works.

thair-jaber avatar Mar 12 '17 08:03 thair-jaber

@thairA2Ajaber I am also having the same issue, but im using a RecyclerView and it won't allow me to scroll or click any items inside the RecyclerView. If I move the RecyclerView below my FloatingActionMenu in the XML it hides the FloatingActionMenu and then makes the RecyclerView scrollable.

How do we fix this?

mikechoch avatar Sep 07 '17 18:09 mikechoch

until the problem is solved use android:clickable="false" android:fillAfter="false" like this <com.github.clans.fab.FloatingActionMenu ....... android:clickable="false" android:fillAfter="false" ....

ahmadalibaloch avatar Sep 09 '17 08:09 ahmadalibaloch