FloatingActionButton icon click event ....
Opened this issue · 3 comments
how to detect which menu item is clicked? any method ?
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;
}
});
"
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;
}
}
});
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....