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



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

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

Android开源BezierView:仿QQ未读消息99+条的红色气泡_第1张图片


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

<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然后导入到自己的项目直接使用即可。

你可能感兴趣的:(android)