Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26493] Android: Add viewShadowRadius, viewShadowColor and viewShadowOffset for parity

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 7.5.0
Fix Version/sn/a
ComponentsAndroid
LabelsengSchedule, parity
ReporterHans Knöchel
AssigneeJoshua Quick
Created2018-10-28T12:09:16.000+0000
Updated2020-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.

Comments

  1. Joshua Quick 2018-10-29

    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.
  2. Brian García 2019-08-07

    maybe this can be useful [|https://stackoverflow.com/questions/51001921/changing-cardview-shadow-color]

JSON Source