Fix crash on overlayColor usage (#20929)

Summary:
see snack for demo on the issue: https://snack.expo.io/jyrno42/overlaycolor-issue-snack
Pull Request resolved: https://github.com/facebook/react-native/pull/20929

Differential Revision: D9727250

Pulled By: hramos

fbshipit-source-id: 03c95d4b5a38ae51ecebb8615fda1af9599c0508
This commit is contained in:
Jyrno Ader
2018-09-07 14:12:30 -07:00
committed by Facebook Github Bot
parent fe4f03517c
commit 6bc483c8cc
4 changed files with 61 additions and 1 deletions

View File

@@ -109,7 +109,7 @@ public class ReactImageManager extends SimpleViewManager<ReactImageView> {
}
}
@ReactProp(name = "overlayColor")
@ReactProp(name = "overlayColor", customType = "Color")
public void setOverlayColor(ReactImageView view, @Nullable Integer overlayColor) {
if (overlayColor == null) {
view.setOverlayColor(Color.TRANSPARENT);