Support multiple sources

Summary:
The nodes version of D3364550. The only difference is that here we
don't get `onSizeChanged` but `onBoundsChanged`, and we need to compute the
height/width of the target image from those bounds. ahmedre please let me know
if any of these assumptions are in any way incorrect.

Reviewed By: ahmedre

Differential Revision: D3424843
This commit is contained in:
Andrei Coman
2016-06-16 07:13:57 -07:00
committed by Ahmed El-Helw
parent f2a6570b07
commit c61aafe95d
5 changed files with 136 additions and 27 deletions
@@ -88,9 +88,7 @@ import com.facebook.react.views.image.ImageResizeMode;
@ReactProp(name = "src")
public void setSource(@Nullable ReadableArray sources) {
final String source =
(sources == null || sources.size() == 0) ? null : sources.getMap(0).getString("uri");
getMutableDrawImage().setSource(getThemedContext(), source);
getMutableDrawImage().setSource(getThemedContext(), sources);
}
@ReactProp(name = "tintColor")