0

Is some way to change the material elevation shadow color? I already read shadow clipping from Android documentation and it is actually not showing any code sample that is usefull for this requirement. I also saw the Carbon library, but Im trying to avoid third party solutions for something that SHOULD actually be easy to do. The only approach I found till now is the following:

    <style name="Widget.AppName.View.White">
        <item name="android:elevation">6dp</item>
        <item name="android:foreground">?attr/selectableItemBackground</item>
        <item name="android:background">@drawable/background_round_corners_white</item>
        <item name="android:outlineSpotShadowColor">@color/colorViewShadow</item>
        <item name="android:padding">16dp</item>
    </style>

But it only works on Android API 28 and above, and the current app Im working on has API 21 as minSdk.

  • It's already answer here: https://stackoverflow.com/questions/29187313/android-change-material-elevation-shadow-color – Hoàng Vũ Anh Sep 11 '20 at 06:16
  • The question mention "avoid third party solutions" and the link you provide highlight the Carbon Library as the answer, that is not the purpose of the question. – Christopher Elias Sep 11 '20 at 06:34
  • hey guy, please scroll to bottom and read all answers – Hoàng Vũ Anh Sep 11 '20 at 06:35
  • 1
    Does this answer your question? [Android change Material elevation shadow color](https://stackoverflow.com/questions/29187313/android-change-material-elevation-shadow-color) – MaxV Sep 11 '20 at 07:19
  • The question mention "avoid third party solutions" and the link you provide highlight the Carbon Library as the answer, that is not the purpose of the question. – Christopher Elias Sep 11 '20 at 19:21

0 Answers0