Skip to content

Commit

Permalink
<Image/>: Add native view config for source
Browse files Browse the repository at this point in the history
Summary:
<Image/>'s source prop was introduced in D51479305.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D56831756
  • Loading branch information
RSNara authored and facebook-github-bot committed May 2, 2024
1 parent de45974 commit 138cfd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -6314,6 +6314,7 @@ public class com/facebook/react/views/image/ReactImageManager : com/facebook/rea
public fun setResizeMethod (Lcom/facebook/react/views/image/ReactImageView;Ljava/lang/String;)V
public fun setResizeMode (Lcom/facebook/react/views/image/ReactImageView;Ljava/lang/String;)V
public fun setSource (Lcom/facebook/react/views/image/ReactImageView;Lcom/facebook/react/bridge/ReadableArray;)V
public fun setSrc (Lcom/facebook/react/views/image/ReactImageView;Lcom/facebook/react/bridge/ReadableArray;)V
public fun setTintColor (Lcom/facebook/react/views/image/ReactImageView;Ljava/lang/Integer;)V
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ public void setAccessible(ReactImageView view, boolean accessible) {

// In JS this is Image.props.source
@ReactProp(name = "src")
public void setSrc(ReactImageView view, @Nullable ReadableArray sources) {
setSource(view, sources);
}

@ReactProp(name = "source")
public void setSource(ReactImageView view, @Nullable ReadableArray sources) {
view.setSource(sources);
}
Expand Down

0 comments on commit 138cfd6

Please sign in to comment.