shehabic/Droppy

no icons

MFlisar opened this issue · 2 comments

    DroppyMenuPopup.Builder droppyBuilder = new DroppyMenuPopup.Builder(getActivity(), view);
    droppyBuilder.triggerOnAnchorClick(false);
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.accept_bet), R.drawable.icon_ok_light).setId(R.string.accept_bet));
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.refuse_bet), R.drawable.icon_cancel_light).setId(R.string.refuse_bet));
    droppyBuilder.addSeparator();
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.delete_bet), R.drawable.icon_delete_light).setId(R.string.delete_bet));
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.add_friend_to_bet), R.drawable.icon_add_light).setId(R.string.add_friend_to_bet));
    droppyBuilder.setOnClick(new DroppyClickCallbackInterface() {
        @Override
        public void call(View v, int id) {
            ...
        }
    });
    DroppyMenuPopup droppyMenu = droppyBuilder.build();
    droppyMenu.show();

I call this code an a button click. I've an mobile with Android 5.0 and this does not show any icon... Can you tell me why?

In DroppyMenuItem.class-----method render,if(this.icon != -1)
you miss renderedView.addView(droppyMenuItemIcon);

Fixed by the latest pull request merge

d4a5dd1