infotech-group / android-drawable-dsl

DSL for constructing the drawables in Kotlin instead of in XML
Apache License 2.0
180 stars 9 forks source link

Add Possibility to Provide Mask for Ripple #10

Closed OFmarting closed 6 years ago

OFmarting commented 6 years ago

Hi, Currently the content and the mask Arguments use the same Drawable when creating a RippleDrawable. There should be the possibility to provide a separate Drawable for the Mask.

meoyawn commented 6 years ago

Hey! you can call rippleDrawable with your own arguments, like this:

https://github.com/infotech-group/android-drawable-dsl/blob/3672bd8237713e0b1b21d7f48a26a85d4505dc27/src/main/kotlin/group/infotech/drawable/dsl/drawable-dsl.kt#L31-L35

but I'm totally open for improvement suggestions

OFmarting commented 6 years ago

Hi, Yes, I know that I can create the RippleDrawable directly. However, I would like to use the maybeRipple function to ensure that also a Drawable is provided on API Levels < 21.