Android NavigationTabBar Badges not showing up -
i using navigationtabbar library , have setup fragments , setup recyclerviews in them , facing issue in showing badges on tab icons using library
this code using
navigationtabbar = findviewbyid(r.id.ntb); final arraylist<navigationtabbar.model> models = new arraylist<>(); models.add( new navigationtabbar.model.builder(resourcescompat.getdrawable(getresources(), r.drawable.news, null), color.argb(0, 0, 0, 0)).title("messenger").badgetitle("ntb1") .build() ); models.add( new navigationtabbar.model.builder(resourcescompat.getdrawable(getresources(), r.drawable.campaigns, null), color.argb(0, 0, 0, 0)).title("asdas").badgetitle("ntb2") .build() ); models.add( new navigationtabbar.model.builder(resourcescompat.getdrawable(getresources(), r.mipmap.ic_connect, null), color.argb(0, 0, 0, 0)).title("connect").badgetitle("ntb3") .build() ); models.add( new navigationtabbar.model.builder(resourcescompat.getdrawable(getresources(), r.drawable.ic_aer_messenger, null), color.argb(0, 0, 0, 0)).title("messenger").badgetitle("ntb4") .build() ); models.add( new navigationtabbar.model.builder(resourcescompat.getdrawable(getresources(), r.drawable.profile, null), color.argb(0, 0, 0, 0)).title("pro").badgetitle("ntb5") .build() ); navigationtabbar.setmodels(models); navigationtabbar.setviewpager(viewpager, 0); navigationtabbar.settitlemode(navigationtabbar.titlemode.active); navigationtabbar.setistinted(true); navigationtabbar.setisbadgeusetypeface(true); navigationtabbar.setisbadged(true); navigationtabbar.setbadgeposition(navigationtabbar.badgeposition.center); navigationtabbar.setbadgebgcolor(color.red); navigationtabbar.setisswiped(true); navigationtabbar.setbgcolor(color.white); navigationtabbar.setisscaled(false); navigationtabbar.seticonsizefraction(0.5f); navigationtabbar.postdelayed(new runnable() { @override public void run() { (int = 0; < navigationtabbar.getmodels().size(); i++) { final navigationtabbar.model model = navigationtabbar.getmodels().get(i); navigationtabbar.postdelayed(new runnable() { @override public void run() { model.showbadge(); } }, * 100); } } }, 500);
but no badges show can point me in right direction ,
Comments
Post a Comment