Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show unread notification counter on Tabs inside TabLayout?

I am using TabLayout of android support design library.

I want to show unread notification counter on the tab with title like below image.

enter image description here

How to set unread count on Tab inside TabLayout?

like image 682
Priyank Patel Avatar asked Aug 28 '15 11:08

Priyank Patel


Video Answer


1 Answers

Use public TabLayout.Tab setCustomView (int layoutResId)

Create a Layout with TextView and Button use this in Custom view.

For reference

setCustomView

Example

Hope this will helpful to you.

like image 107
Amit Gupta Avatar answered Sep 19 '22 18:09

Amit Gupta