Android开源BezierView:仿QQ未读消息99+条的红色气泡

Android开源BezierView:仿QQ未读消息99+条的红色气泡

在移动版的QQ中,如果用户的QQ消息超过99条,会有这样的消息提示气泡(包含拖动动画):


Android第三方开源的BezierView实现了上述QQ的99+条未读消息气泡显示。
Android开源BezierView在github上的项目主页是:https://github.com/chenupt/BezierDemo
使用Android BezierView只需要写一个布局即可:

  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  2.     xmlns:tools="http://schemas.android.com/tools"  
  3.     android:layout_width="match_parent"  
  4.     android:layout_height="match_parent"  
  5.     android:orientation="vertical"  
  6.     tools:context=".MainActivity" >  
  7.   
  8.     <github.chenupt.bezier.BezierView  
  9.         android:layout_width="match_parent"  
  10.         android:layout_height="match_parent"  
  11.         android:background="@android:color/transparent" />  
  12.   
  13. </LinearLayout>  
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity" >

    <github.chenupt.bezier.BezierView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent" />

</LinearLayout>

代码运行结果如上图所示。


剩下原作者已经写好,如果在项目开发中需要使用BezierView,直接将github上的项目改变成一个lib然后导到自己的项目直接使用即可。



转载自 :http://blog.csdn.net/zhangphil

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值