2016-09-26 37 views
-3

我想繪製一個這樣的四分之一圓。 android xml drawable 如何在xml中繪製四分之一圈android

是否有任何方法使用xml形狀來做這種形狀?

+0

_I想畫四分之一circle_你嘗試過什麼到目前爲止,實現這一目標? –

+1

您可以使用畫布繪製它或在減號中給予填充。 –

回答

11

你可以使用下面的矩形形狀.xml文件

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="rectangle"> 
    <size android:height="15dp" android:width="15dp"/> 
    <solid android:color="@color/darkGray"/> 
    <corners android:topRightRadius="0dp" android:bottomRightRadius="15dp"/> 
</shape> 
+0

非常感謝:) –