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