Skip to content

Commit 673ef39

Browse files
dulmandakhfacebook-github-bot
authored andcommitted
resizeMode applies to Image.defaultSource (#22216)
Summary: resizeMode applies to Image.defaultSource, because depending on screen resolution sometimes we see padding around defaultSource image while source loading. Now we can control scale of both source and defaultSource. Changelog: ---------- [Android] [Fixed] - Image.resizeMode will apply to defaultSource, enhanced user experience. Previously, resizeMode didn't applied to defaultSource, therefore depending on screen resolution sometimes we see padding around defaultSource image while source loading. Pull Request resolved: #22216 Differential Revision: D13088220 Pulled By: mdvacca fbshipit-source-id: 92c66cf6228f3b7666b9ef2404d034f0005b5234
1 parent 271ace9 commit 673ef39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public void maybeUpdateView() {
439439
hierarchy.setActualImageScaleType(mScaleType);
440440

441441
if (mDefaultImageDrawable != null) {
442-
hierarchy.setPlaceholderImage(mDefaultImageDrawable, ScalingUtils.ScaleType.CENTER);
442+
hierarchy.setPlaceholderImage(mDefaultImageDrawable, mScaleType);
443443
}
444444

445445
if (mLoadingImageDrawable != null) {

0 commit comments

Comments
 (0)