Android第三方开源的BezierView实现了上述QQ的99+条未读消息气泡显示。
Android开源BezierView在github上的项目主页是:https://github.com/chenupt/BezierDemo
使用Android BezierView只需要写一个布局即可:
activity_main.xml:
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>
MainActivity:
1 package com.zzw.testbezierview; 2 3 import android.app.Activity; 4 import android.os.Bundle; 5 6 public class MainActivity extends Activity { 7 8 @Override 9 protected void onCreate(Bundle savedInstanceState) { 10 super.onCreate(savedInstanceState); 11 setContentView(R.layout.activity_main); 12 } 13 14 }