https://github.com/AlexLiuSheng/BadgeView

include:

compile 'com.allenliu.badgeview:library:1.1.1'(newest)

bind like this:

 BadgeFactory.create(this)
.setTextColor(Color.White)
.setWidthAndHeight(25,25)
.setBadgeBackground(Color.Red)
.setTextSize(10)
.setBadgeGravity(Gravity.Right|Gravity.Top)
.setBadgeCount(20)
.setShape(BadgeView.SHAPE_CIRCLE)
.setSpace(10,10)
.bind(view);

if u want to set space dont use setMargin(),use setSpace instead.

There are some other constructer methods and you can be easy to create your own shape :

BadgeFactory.createDot(this).setBadgeCount(20).bind(imageView);
BadgeFactory.createCircle(this).setBadgeCount(20).bind(imageView);
BadgeFactory.createRectangle(this).setBadgeCount(20).bind(imageView);
BadgeFactory.createOval(this).setBadgeCount(20).bind(imageView);
BadgeFactory.createSquare(this).setBadgeCount(20).bind(imageView);
BadgeFactory.createRoundRect(this).setBadgeCount(20).bind(imageView);

unbind view just use unbind method.

 badgeView.unbind();

最新文章

  1. Python之RabbitMQ操作
  2. C#中的GDI+图形绘制方法
  3. fzu 2107 Hua Rong Dao(状态压缩)
  4. 四个使用this的典型应用
  5. oracle实现自增列
  6. 在Ubuntu上为Android系统的Application Frameworks层增加硬件访问服务(老罗学习笔记5)
  7. Ubuntu 14.04下java开发环境的搭建--2--Eclipse的安装
  8. Python 之 使用 PIL 库做图像处理
  9. 第 3 章 单例模式【Singleton Pattern】
  10. PoshyTip jQuery 文本提示插件的使用
  11. Python 统计代码行
  12. 怎样绕过oracle listener 监听的password设置
  13. struts2.1.6教程七、国际化
  14. 无外接键盘安装 raspberry pi 3B+ 安装系统
  15. Python:安装MYSQL Connector
  16. 选择、操作web元素-2
  17. Java基础-变量的定义以及作用域详解
  18. OpenCV学习笔记:opencv_highgui模块
  19. MySQL一查就会
  20. linux设备驱动模型-浅析-转

热门文章

  1. redis(五)
  2. Drying [POJ3104] [二分答案]
  3. pycharm 注册码/License server 2017年最新
  4. cleanmymacchinese下载链接
  5. Python操作redis系列之 列表(list) (五)(转)
  6. datagrip离线安装驱动jar
  7. maven error: element dependency can not have character children
  8. 关于Gerrit code review 介绍与安装
  9. curl 模拟表单post文件
  10. linux 设备驱动概述