如何在Android xml可绘制文件中定义圆形? - How to define a circle shape in an Android xml drawable file?

问题:

I have some problems finding the documentation of the definitions of shapes in XML for Android. 我在查找Android版XML中的形状定义文档时遇到一些问题。 I would like to define a simple circle filled with a solid color in an XML File to include it into my layout files. 我想在XML文件中定义一个用纯色填充的简单圆圈,以将其包含到布局文件中。 android

Sadly the Documentation on android.com does not cover the XML attributes of the Shape classes. 遗憾的是,android.com上的文档未涵盖Shape类的XML属性。 I think I should use an ArcShape to draw a circle but there is no explanation on how to set the size, the color, or the angle needed to make a circle out of an Arc. 我想我应该使用ArcShape画一个圆,可是没有设置如何设置从圆弧中画出圆所需的大小,颜色或角度的说明。 布局


解决方案:

参考一: https://stackoom.com/question/DMad/如何在Android-xml可绘制文件中定义圆形
参考二: https://oldbug.net/q/DMad/How-to-define-a-circle-shape-in-an-Android-xml-drawable-file
相关文章
相关标签/搜索