如何在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
相關文章
相關標籤/搜索