怎么在Android中绘制一个圆角矩形

这篇文章将为大家详细讲解有关怎么在Android中绘制一个圆角矩形,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

圆角矩形:

res\drawable\shape_small_label.xml

<?xml version="1.0" encoding="utf-8"?>
<shape
 xmlns:android="http://schemas.android.com/apk/res/android">
 <!-- 内部颜色 -->
 <solid
  android:color="#ffffff" />
 <!-- 边缘线条颜色 -->
 <stroke
  android:width="1dp"
  android:color="@color/rgb53_99" />
 <!-- 圆角的幅度 -->
 <corners
  android:topLeftRadius="5dip"
  android:topRightRadius="5dip"
  android:bottomLeftRadius="5dip"
  android:bottomRightRadius="5dip" />
</shape>

关于怎么在Android中绘制一个圆角矩形就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。