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

FABRevealMenu.setMenuItems() overwrites items ids #36

Open
nowulus opened this issue Nov 28, 2018 · 1 comment
Open

FABRevealMenu.setMenuItems() overwrites items ids #36

nowulus opened this issue Nov 28, 2018 · 1 comment

Comments

@nowulus
Copy link

nowulus commented Nov 28, 2018

 public void setMenuItems(ArrayList<FABMenuItem> menuList) throws NullPointerException {
        this.menuList = menuList;

        mMenuRes = -1;
        mCustomView = null;
        if (menuList == null)
            throw new NullPointerException("Null items are not allowed.");
        removeAllViews();

        if (menuList.size() > 0) {
            for (int i = 0; i < menuList.size(); i++) {
                FABMenuItem item = menuList.get(i);
                **item.setId(i);** 
                if (item.getIconDrawable() == null && item.getIconBitmap() != null) {
                    item.setIconDrawable(new BitmapDrawable(getResources(), item.getIconBitmap()));
                }
            }
        }
        setUpMenuView();
    }
@HarinTrivedi
Copy link
Owner

@nowulus Hi, there is another method you need to use for custom menuids
setUpMenu()

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

No branches or pull requests

2 participants