有没有办法创建一个阴影给定一个drawable与如下所示的路径:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FFFFFF"
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>
xml和编程都会很好 . 我试着做一点研究,但找不到任何东西 .
编辑:理想情况下,我需要使用任何矢量进行重复使用 . 就像是:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
//magic happens
</item>
<item>
<include> my_vector </include>
</item>
</layer-list>
再次,即使不是更好,即使按照编程方式也可以
1 回答
请检查此代码 .