[TIMOB-26493] Android: Add viewShadowRadius, viewShadowColor and viewShadowOffset for parity
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 7.5.0 |
Fix Version/s | n/a |
Components | Android |
Labels | engSchedule, parity |
Reporter | Hans Knöchel |
Assignee | Joshua Quick |
Created | 2018-10-28T12:09:16.000+0000 |
Updated | 2020-09-18T17:13:30.000+0000 |
Description
We require some shadow specs in our design that are currently iOS only:
- viewShadowRadius
- viewShadowColor
- viewShadowOffset
It seems like the [Outline API](https://developer.android.com/reference/android/graphics/Outline) is best to do this programmatically, although it requires Android 5 to work.
If there is a workaround to use it today, the priority can be lowered, but for now, it's a blocker for us.
I agree that we should have parity. However, if you want a shadow effect now, then this can also be done via the "elevation" property, which Titanium already supports. This is how Google implements shadows for buttons. The only problem with it is: * Only supported on Android 5.0 and up. * View order is ignored. That is, painter's algorithm (last view is always on top) is no longer respected. Increasing the "elevation" actually increases the view's z-axis position. * Can't customize shadow effect other than increasing the elevation.
maybe this can be useful [|https://stackoverflow.com/questions/51001921/changing-cardview-shadow-color]