我正在制作电影票应用程序,现在我需要创建一个像这样模糊阴影的弧形视图:

有办法做到这一点吗?
我试过用x轴旋转图像(-45%),但这不是我所需要的。
发布于 2020-03-17 13:07:32
如@naggab的评论所示,您应该包括此图像
但是,我也尝试使用下面的代码来实现这一点
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/white" />
<size
android:width="450dp"
android:height="110dp" />
</shape>
</item>
<item android:top="50dp">
<shape android:shape="rectangle">
<solid android:color="@color/colorPrimary" />
</shape>
</item>
<item android:top="20dp">
<shape android:shape="oval">
<solid android:color="@color/colorPrimary" />
<size
android:width="450dp"
android:height="110dp" />
</shape>
</item>
<item android:top="50dp">
<rotate
android:fromDegrees="4"
android:toDegrees="45">
<shape android:shape="rectangle">
<solid android:color="@color/colorPrimary" />
</shape>
</rotate>
</item>
<item android:top="50dp">
<rotate
android:fromDegrees="-4"
android:toDegrees="45">
<shape android:shape="rectangle">
<solid android:color="@color/colorPrimary" />
</shape>
</rotate>
</item>
</layer-list>https://stackoverflow.com/questions/60722475
复制相似问题