一、写在前面的:
上一篇介绍了Rectangle矩形,下面介绍一下oval椭圆的使用。
oval用来绘制椭圆,而在实际应用中,更多的是用来绘制正圆,例如:消息个数提示背景,圆形按钮等。
二、效果:
三、代码实现:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="1"
android:textSize="20sp"
android:textColor="#ffffff"
android:background="@drawable/text_shape6"/>
<TextView
android:layout_width="51dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"