Android 实现类似微信客户端朋友圈更新提示的小红点

时间:2016-04-05 15:45:49   收藏:0   阅读:545

用到的类:

com.jauker.widget.BadgeView

实现代码:

1 BadgeView imageBadge = new BadgeView(getContext());
2             imageBadge.setTargetView(mHolder.image);
3             imageBadge.setText("");
4             imageBadge.setHeight(30);
5             imageBadge.setWidth(30);
6             imageBadge.setBackground(15, getContext().getResources().getColor(R.color.badge_red));//#F24541

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!