shadow

inline fun Style.shadow(elevation: Dimen, outlineProvider: ViewOutlineProvider = ViewOutlineProvider.BOUNDS, @ColorInt ambientShadowColor: Int = Color.BLACK, @ColorInt spotShadowColor: Int = Color.BLACK): Style

Style for attaching a standard Material Design shadow to a component. Refer to https://material.io/design/environment/light-shadows.html for more information.

  • elevation: Sets the elevation of this component above the surface using https://developer.android.com/reference/android/view/View#setElevation(float). Larger elevation values result in larger shadows.

  • outlineProvider: Used to determine the shape of the shadow. If not specified, https://developer.android.com/reference/android/view/ViewOutlineProvider#BOUNDS will be used to target the component's bounds.

  • ambientShadowColor: Sets the color of the ambient shadow. Ignored on < API 28 devices. See https://developer.android.com/reference/android/view/View#setOutlineAmbientShadowColor(int)

  • outlineShadowColor: Sets the color of the spotlight shadow. Ignored on < API 28 devices. See https://developer.android.com/reference/android/view/View#setOutlineSpotShadowColor(int)