FloatingActionButton icon indicating copy to clipboard operation
FloatingActionButton copied to clipboard

How to get click listener of FloatingActionMenu

Open Rakesh-Kumawat opened this issue 8 years ago • 7 comments

Rakesh-Kumawat avatar Jan 12 '16 06:01 Rakesh-Kumawat

You can use setOnMenuButtonClickListener() to know the click event.

FloatingActionMenu mFAM= (FloatingActionMenu) view.findViewById(R.id.menu_red);

mFAM.setOnMenuButtonClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mFAM.isOpened()) {

                    Intent i = new Intent(getActivity(), SecondActivity.class);
                    startActivity(i);

                    mFAM.close(true);
                }
                else
                    mFAM.open(true);
            }
        });

First click on FloatingActionMenu will open it and show FloatingActionButton's . Second click on FloatingActionMenu will start SecondActivity and finally close the FloatingActionMenu.

Thanks...

ferdous-ahamed avatar May 06 '16 10:05 ferdous-ahamed

Thanks. This solved my problem too.

recepinanc avatar Jul 21 '16 13:07 recepinanc

Thank you!!!!!!!

SeaRoth avatar Jul 17 '17 15:07 SeaRoth

thanks from taiwan!

ryanleefromtw avatar Jul 24 '17 10:07 ryanleefromtw

Where does the view binding take place for the menu buttons?

AtharvaAbsolute avatar Feb 08 '19 09:02 AtharvaAbsolute

Click listnener works but it doesn't display floatingbuttions anymore... now what should I do ?

IQaiserHussain avatar Dec 16 '19 09:12 IQaiserHussain

Click listnener works but it doesn't display floatingbuttions anymore... now what should I do ?

    floatingActionMenu.setOnMenuButtonClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            floatingActionMenu.open(true);

AlvaroBriz avatar Feb 21 '20 10:02 AlvaroBriz