shape可以绘制矩形环形以及椭圆、所以只需要用椭圆就可以完成需求、在使用的时候将控件比如textview的高宽设置成一样就是正圆、solid表示远的填充色、stroke则代表远的边框线、所以两者结合可以实现带边缘的圆、Shape 代码
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@color/base_color" />
<padding
android:left="2dp"
android:top="1dp"
android:right="2dp"
android:bottom="1dp" />
<solid
android:color="@color/green" />
<stroke
android:width="1dp"
android:color="@android:color/white" />
<size android:width="25dp"
android:height="25dp" />
</shape>
把以上代码添加到drawable里面、通过background引用就可以了
<TextView
android:id="@ id/message_category_unread_count"
style="@style/comm_text_style_14_aaaaaa"
android:layout_marginLeft="70dp"
android:layout_marginTop="5dp"
android:background="@drawable/design_red_point"
android:gravity="center"
android:textSize="@dimen/text_size_comment_20"
android:text="7"
android:textColor="@android:color/white" />
(责任编辑:最模板) |

仿网易尚品官网ecshop模板
人气:1594
magento通用外贸商城主题模
人气:292
ecshop汽车配件类外贸模板
人气:1826
ecshop仿红孩子母婴用品商
人气:1177
免费ecshop仿韩都衣舍带频
人气:7190
ecshop英文外贸工业模板
人气:474