I want to implement notification badge with android.support.design.widget.TabLayout
. I had tried my best effort to implement it but fails.
Any help wou
I will use this:
tabLayout.getTabAt(0).getOrCreateBadge().setNumber(10);
I suggest use a CustomView for tabs. you can create a new view with badge and set that to your tabs.
tab.setCustomView(R.layout.badged_tab);
There are easy way as well. Just append a special characters behind. It will look like whatsapp does.
➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉ ➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓
tabLayout.addTab(tabLayout.newTab().setText("News " + ➊));