BGABadgeView 是 Android 自定义徽章控件。
效果图:
依赖:
dependencies { compile 'com.nineoldandroids:library:2.4.0' compile 'cn.bingoogolapple:bga-badgeview:latestVersion@aar' }
目前支持的徽章类:
接口说明:
/** * 显示圆点徽章 */ void showCirclePointBadge(); /** * 显示文字徽章 * * @param badgeText */ void showTextBadge(String badgeText); /** * 隐藏徽章 */ void hiddenBadge(); /** * 显示图像徽章 * * @param bitmap */ void showDrawableBadge(Bitmap bitmap); /** * 设置拖动删除徽章的代理 * * @param delegate */ void setDragDismissDelegage(BGADragDismissDelegate delegate); /** * 是否显示徽章 * * @return */ boolean isShowBadge();