Issue
I want to implement notification badge with android.support.design.widget.TabLayout
. I had tried my best effort to implement it but fails.
Any help would by greatly appreciated.
Solution
My solution to this was using https://github.com/jgilfelt/android-viewbadger and setting a custom view to each tab:
My tabs have only icons so I used ImageView, but I believe you can use any other view, check https://github.com/jgilfelt/android-viewbadger/blob/master/README.markdown:
private BadgeView badge;
Tab tab = tabLayout.getTabAt(position);
ImageView imageView = new ImageView(context);
tab.setCustomView(imageView);
badge = new BadgeView(context, imageView);
Answered By - lucas_sales
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.