I am using the TabLayout Android design support library.
I want to show an opaque notification counter in a tab with a header, as shown below.
How to set an unread account on the Tabinside TabLayout?
Tab
TabLayout
Use public TabLayout.Tab setCustomView (int layoutResId)
public TabLayout.Tab setCustomView (int layoutResId)
Create Layoutwith TextViewand Buttonusing this in the user view.
Layout
TextView
Button
For reference
setCustomView
Example
Hope this helps you.
android-viewbadger...