BrotherV / Floating-ArcMenu

A prety menu for all application
129 stars 35 forks source link

FloatingActionButton icon click event .... #19

Open altaf2892 opened 6 years ago

altaf2892 commented 6 years ago

how to detect which menu item is clicked? any method ?

BrotherV commented 6 years ago

Follow the instruction as I mentioned. In java code ,as can be seen, you can add menu item by a 'for' loop. in this section you can access click event of menu items. " menu.addItem(item, str[i], new View.OnClickListener() { @Override public void onClick(View v) { switch(i){ case 0: //menu item 1 clicked break; case 1: //menu item 2 clicked break; } }); "

altaf2892 commented 6 years ago

its Right.. i saw this java code on instruction Page.But i want icon click because i have set circleMenuView.showTooltip(false); so text is invisible i have only icon visible and i want click of it.

update yes got it...

item.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    switch (position) {
                        case 0:
                            break;
                        case 1:

                            break;
                        case 2:

                        case 3:

                            break;
                    }
                }

            });
altaf2892 commented 6 years ago

if i select any of Fab menu should be closed nad i found circleMenuView.performClick(); this method close the menu button doesn't change the plus icon to close ( showing close button after applying circleMenuView.performClick()) this...tooo....