我需要更改视图的阴影颜色,尤其是MaterialCardView。无论如何,有办法在本地进行吗?或者也许是一个具有良好“绘图性能”的库? 我尝试了 View#setOutlineAmbientShadowColor(int color) 和 View#setOutlineSpotShadowColor(int color) 但不幸的是我无法在项目中使用 API 28 的东西。
<resources>
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:fontFamily">@font/century_gothic</item>
<item name="android:ambientShadowAlpha">1</item>
<item name="android:spotShadowAlpha">1</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>