带有角标的iamgeview,类似于qq、微信未读消息提示效果
<dependency>
<groupId>com.hlq</groupId>
<artifactId>imageviewBound</artifactId>
<version>1.0.0</version>
<type>pom</type>
</dependency>
compile 'com.hlq:imageviewBound:1.0.0'
在xml中:
<hlq.ImageViewBound
android:id="@+id/wode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher" />
在java代码中:
imageViewBound.setMessageNum(1);每次设置都实时有效
当设置的数量>=100时,则会显示99+,字体大小根据设置的数字自动适配。
项目源码:https://github.com/huanglinqing123/ImageviewBound 欢迎start和issue
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有