badgeview
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();
badgeview的更多相关文章
- Android BadgeView使用
BadgeView是第三方的插件,用来显示组件上面的标记,起到提醒的作用,下载地址如下:http://files.cnblogs.com/files/hyyweb/android-viewbadger ...
- 自定义BadgeView
-(instancetype)initWithFrame:(CGRect)frame{ if (self=[super initWithFrame:frame]) { self.u ...
- xamarin.android 给View控件 添加数字提醒效果-BadgeView
本文代码从java项目移植到.net项目 java开源项目:https://github.com/jgilfelt/android-viewbadger using System; using S ...
- BadgeView的使用介绍
在现在大部分的信息发布类应用,都有这样的一个功能:当后台数据更新,比如有系统消息或者是用户间有互动的时候,通过在控件上显示一个小红点来提示用户有新的信息.一般来说,这种业务需求,我们可以在布局文件中隐 ...
- BadgeView新提示开源工具类
BadgeView是使用某个图标作为新功能的提醒,类似于收到短息后短信图标的右上方有信息数目或者其他的显示性提示.BadgeView很好的实现了这个功能,而且进行了拓展,可自定义位置和提示图标. 工具 ...
- BadgeView使用介绍
前段时间做的一个淘宝客的项目,需要在商品图片上添加价格标签,之前自己使用TextView和Cavas绘制的感觉效果一般,今天偶然在CSDN上发现BadgeView这个开源项目,在git下载下来之后,使 ...
- 【Android界面实现】信息更新小红点显示——自己定义控件BadgeView的使用介绍
在如今大部分的信息公布类应用,都有这样的一个功能:当后台数据更新,比方有系统消息或者是用户间有互动的时候,通过在控件上显示一个小红点来提示用户有新的信息.一般来说,这样的业务需求,我们能够在布局文件里 ...
- 一个可以自由定制外观、支持拖拽消除的MaterialDesign风格Android BadgeView
为了尊重作者,先放上链接:https://github.com/qstumn/BadgeView BadgeView 一个可以自由定制外观.支持拖拽消除的MaterialDesign风格Android ...
- BadgeView 圆形数字提醒 购物车常用
实际上BadgeView这个类就是继承TextView的.很多TextView中设置字体的方法都适用于BadgeView. 1. setTargetView(View) --> 设置哪个控件显示 ...
随机推荐
- BZOJ5177 : [Jsoi2013]贪心的导游
首先预处理出对于每个模数,所有被模数按结果从大到小排序的结果,那么对于一个询问,如果可以在$O(1)$时间内判断某个数字是否出现,则可以$O(1000)$回答. 考虑对序列进行分治,对于区间$[l,r ...
- python控制流
1. if...elif...else: 语法: if 判断条件: 语句... elif 判断条件: 语句... else: 语句... #elif语句可以有0个或多个 2. while和for循环: ...
- Microsoft.AspNet.Identity: UserID用整型数据表示, 而不是GUID
第一篇: 这个好像不太好 http://stackoverflow.com/questions/19553424/how-to-change-type-of-id-in-microsoft-aspn ...
- 概率图模型 基于R语言 这本书中的第一个R语言程序
概率图模型 基于R语言 这本书中的第一个R语言程序 prior <- c(working =0.99,broken =0.01) likelihood <- rbind(working = ...
- px2rem
vue做移动端适配,借助px2rem 插件方便的将px单位转为了rem 1.安装 npm install px2rem-loader lib-flexible --save 2.在项目入口文件mai ...
- 使用ScriptableObject创建.asset文件
.asset一般用来存储一些配置,比如SDK初始化的相关参数. using System.Collections.Generic; using UnityEngine; namespace XXX { ...
- ceph:如何处理rados --striper上传失败的对象
如何处理使用rados --striper上传失败的对象? `Remove striped objects from a ceph pool without using the striper lib ...
- NoSQL简单介绍
这里介绍一下如今经常使用的NoSQL以及各自的特点. NoSQL是2009年突然发展起来的.如今趋于稳定的状态,市场上也有了一些比較成熟的产品. 传统的关系型数据库为了保证通用性的设计而带来了功能复杂 ...
- springboot项目logback配置文件示例
logback-spring.xml <?xml version="1.0" encoding="UTF-8"?> <configuratio ...
- MySQL 5.5主从关于‘复制过滤’的深入探究
关于MySQL主从复制的过滤,例如通过binlog-ignore-db.replicate-do-db.replicate-wild-do-table等.如果不好好研究过这些过滤选项就用的话,是有可能 ...