Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion resources/android/ImageRenderer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ object ImageRenderer {
fun Render(node: NativeUINode, modifier: Modifier) {
val p = node.props
val src = p.getString("src")
val fit = p.getInt("fit")
// No `fit` prop means no `object-*` class. Default to Fit (1) so
// an unclassed image scales into its frame like iOS does, instead
// of ContentScale.None painting the bitmap at intrinsic size and
// center-cropping it to the frame.
val fit = p.getInt("fit", 1)
val alt = p.getString("alt")
val tintArgb = p.getColor("tint_color", 0)
val radius = node.style?.borderRadius ?: 0f
Expand Down
Loading