badgeview
2024-09-24 14:14:40
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();
最新文章
- Python之RabbitMQ操作
- C#中的GDI+图形绘制方法
- fzu 2107 Hua Rong Dao(状态压缩)
- 四个使用this的典型应用
- oracle实现自增列
- 在Ubuntu上为Android系统的Application Frameworks层增加硬件访问服务(老罗学习笔记5)
- Ubuntu 14.04下java开发环境的搭建--2--Eclipse的安装
- Python 之 使用 PIL 库做图像处理
- 第 3 章 单例模式【Singleton Pattern】
- PoshyTip jQuery 文本提示插件的使用
- Python 统计代码行
- 怎样绕过oracle listener 监听的password设置
- struts2.1.6教程七、国际化
- 无外接键盘安装 raspberry pi 3B+ 安装系统
- Python:安装MYSQL Connector
- 选择、操作web元素-2
- Java基础-变量的定义以及作用域详解
- OpenCV学习笔记:opencv_highgui模块
- MySQL一查就会
- linux设备驱动模型-浅析-转
热门文章
- redis(五)
- Drying [POJ3104] [二分答案]
- pycharm 注册码/License server 2017年最新
- cleanmymacchinese下载链接
- Python操作redis系列之 列表(list) (五)(转)
- datagrip离线安装驱动jar
- maven error: element dependency can not have character children
- 关于Gerrit code review 介绍与安装
- curl 模拟表单post文件
- linux 设备驱动概述