Skip to content

Commit

Permalink
resizeMode applies to Image.defaultSource (#22216)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Nov 16, 2018
1 parent 271ace9 commit 673ef39
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ public void maybeUpdateView() {
hierarchy.setActualImageScaleType(mScaleType);

if (mDefaultImageDrawable != null) {
hierarchy.setPlaceholderImage(mDefaultImageDrawable, ScalingUtils.ScaleType.CENTER);
hierarchy.setPlaceholderImage(mDefaultImageDrawable, mScaleType);
}

if (mLoadingImageDrawable != null) {
Expand Down

0 comments on commit 673ef39

Please sign in to comment.