提交 acf66d1e 编写于 作者: C chaychan

修复超过"未读数阈值"后不显示"阈值+"的问题

上级 99fd00b6
......@@ -117,7 +117,7 @@ public class MainActivity extends FragmentActivity {
});
mBottomBarLayout.setUnread(0,20);//设置第一个页签的未读数为20
mBottomBarLayout.setUnread(1,101);//设置第二个页签的未读书
mBottomBarLayout.setUnread(1,1001);//设置第二个页签的未读数
mBottomBarLayout.showNotify(2);//设置第三个页签显示提示的小红点
mBottomBarLayout.setMsg(3,"NEW");//设置第四个页签显示NEW提示文字
}
......
......@@ -51,6 +51,7 @@
app:itemTextSize="8sp"
app:itemMarginTop="-5dp"
app:openTouchBg="true"
app:unreadThreshold="999"
app:touchDrawable="@drawable/selector_bg"
/>
......
......@@ -207,7 +207,7 @@ public class BottomBarItem extends LinearLayout {
} else if (unreadNum <= unreadNumThreshold) {
mTvUnread.setText(String.valueOf(unreadNum));
} else {
mTvUnread.setText(String.format(Locale.CHINA, "%d+", unreadNum));
mTvUnread.setText(String.format(Locale.CHINA, "%d+", unreadNumThreshold));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册