动态更新标签数量,每个标签之间的间距会跳跃
作者: wangzhan3429创建于 2018年7月31日更新于 2023年12月12日
First, we set the spacing between each tab: titleContainer.setDividerDrawable(new ColorDrawable() { public int getIntrinsicWidth() { return UIUtil.dip2px(BadgeTabExampleActivity.this, 35); } }); Then, we post an event to update the badge value after 5 seconds, and call notify to update. At this time, the spacing between the tabs will be reduced, and there will be no spacing. The underline is set to be the same width as the text.
内容来源: hackware1993/MagicIndicator