7

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?

4

2 回答 2

10

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.

于 2015-08-28T11:41:05.753 回答
0

Take a look at android-viewbadger...

于 2015-08-28T11:04:47.970 回答