mikepenz/Android-ActionItemBadge

Appbar Icon Disappears After Update

Closed this issue · 4 comments

Hello my Appbar Icon Disappears after i update it!

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.app_bar_main, menu);

        int badgeCount =5;

        if (badgeCount > 0) {
            ActionItemBadge.update(this, menu.findItem(R.id.notify_me), (Drawable) Iconics.findFont(this,"Fontawesome"), ActionItemBadge.BadgeStyles.RED, badgeCount);
        } else {
            ActionItemBadge.hide(menu.findItem(R.id.notify_me));
        }
        return super.onCreateOptionsMenu(menu);
    }

@frankodoom you are sure it's running into update and not hide?

i run into update i see the badger alright but my Menu Item becomes hidden, looking at the Xml in your documentation what becomes :actionLayout ?

well the actionLayout is something the android framework provides to allow modifying the xml used to display in the toolbar

@frankodoom I see no reason why this happens. please refer to the sample app. if this does not help. please re-open and provide a open-able sample application which allows me to re-produce this