Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloatingActionButton icon click event .... #19

Open
altaf2892 opened this issue May 4, 2018 · 3 comments
Open

FloatingActionButton icon click event .... #19

altaf2892 opened this issue May 4, 2018 · 3 comments

Comments

@altaf2892
Copy link

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

@BrotherV
Copy link
Owner

BrotherV commented May 4, 2018

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
Copy link
Author

altaf2892 commented May 4, 2018

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 altaf2892 reopened this May 4, 2018
@altaf2892
Copy link
Author

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....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants