Skip to content

Instantly share code, notes, and snippets.

@ricknout
Created July 31, 2020 20:02
Show Gist options
  • Save ricknout/b8ffb6d7a427940fc1913a66fc446c3a to your computer and use it in GitHub Desktop.
Save ricknout/b8ffb6d7a427940fc1913a66fc446c3a to your computer and use it in GitHub Desktop.
MDC-Android MaterialShapeDrawable shadow rendering
/* Copyright 2020 Google LLC.
SPDX-License-Identifier: Apache-2.0 */
/**
* Set shadow compat mode to be one of:
* - SHADOW_COMPAT_MODE_DEFAULT: Use platform rendering on API 21+, else compat rendering
* - SHADOW_COMPAT_MODE_NEVER: Use platform rendering always
* - SHADOW_COMPAT_MODE_ALWAYS: Use compay rendering always
*/
msd.setShadowCompatibilityMode(shadowMode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment