【发布时间】:2019-07-28 23:05:43
【问题描述】:
我想使用 xml drawble 创建一个半实心圆形?
这是我迄今为止尝试过的努力
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FCD83500"/>
<size
android:width="10dp"
android:height="5dp"/>
<corners
android:bottomLeftRadius="50dp"
android:bottomRightRadius="50dp"/>
</shape>
使用上面的代码我可以创建半圆,但我不知道如何使半圆透明
我也访问过一些 SO 帖子,但找不到任何解决方案
- Half circle shape not work
- how to draw a half circle in android
- How to define a circle shape in an Android xml drawable file?
如果需要更多信息,请告诉我。提前致谢。您的努力将不胜感激。
【问题讨论】:
-
有必要使用xml drawable吗?否则,您也可以使用矢量图形。
-
@BalvinderSingh 随时使用
vector graphics发布解决方案
标签: android android-drawable shapes