For the first time, I am trying to use the badge notification icon on the material TabItem. My goal is to show the badge with the total number of items in the RecyclerView. I was going through with this document Tab Layout - Material Components for Android and trying to implement the functionality accordingly, but at this line BadgeDrawable badge = tablayout.getTab(0).getOrCreateBadge(); I am getting error that BadgeDrawable class not found.
Can anyone help me with this?
Thanks
The BadgeDrawble integration into TabLayout was released with the 1.1.0-alpha07.
Use the latest 1.1.0 version available today:
implementation 'com.google.android.material:material:1.1.0'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With