简体   繁体   中英

How to add notification Badge count in Android?

I have been learning coding recently and i wanted to develop an android app .I have the vision of what it needs to do but i need some help and i am unable to implement that vision in codes, so seeking some help here. please assist of you can.

The situation here is I created a app with Bottom Navigation Activity. In the home fragment and dashboard i had used few view and web view to show or fetch the information and presented but unable to sort out the notification fragment.

In this area i wanted to display notification number and list of notification in that page. An example image for your reference. I just need that please advise how to take this forward. I would he happy if someone can assist me .

在此处输入图片说明

Please try below lib it is allow to add budge into bottom Navigation

https://github.com/aurelhubert/ahbottomnavigation

Using this lib add budge following below code

bottomNavigation.setNotification(notification, bottomNavigation.getItemsCount() - 1);

Please find below result as you want

在此处输入图片说明

I hope this can help you!

Thank You.

Your response is for highly skilled programmer friend. But i managed to run it step by step and took 2 days to figure out. But this is a good answer. Thank you so much. Now I'm confident that I can build this feature

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM