Skip to content

[MaterialShapeDrawable] Custom shadows with Paint's setShadowLayer #2117

@ussernamenikita

Description

@ussernamenikita

In my project i use Paint.setShadowLayer(float radius, float dx, float dy, @ColorInt int shadowColor) inside my custom Drawable, for custom shadows. I want to switch to MaterialShapeDrawable, but i can't configure MaterialShapeDrawable's Paint with this custom values.

I think it would be great, if there will be function `MaterialShapeDrawable.setPaintShadowLayer(float radius, float dx, float dy, @ColorInt int shadowColor)' which i can use for custom shadow configuration.

Maybe there is a possibility to select by brute force applicable values with shadowCompatOffset/shadowCompatRotation/shadowCompatRadius for my case, but in this case MaterialShapeDrawable will use bitmap for shadows.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions