Closed yvdv-one closed 8 months ago
The issue would be fixed with the following code changes in image.android.ts:
if (this.placeholderImageUri && placeholderImageDrawable) { builder.setPlaceholderImage(placeholderImageDrawable, this.stretch); }
and lines 771-778:
public setPlaceholderImage(drawable, scaleType: string): GenericDraweeHierarchyBuilder { if (!this.nativeBuilder) { return this; } if (scaleType) { this.nativeBuilder.setPlaceholderImage(drawable, getScaleType(scaleType)); } else { this.nativeBuilder.setPlaceholderImage(drawable); } return this; }
I could not create a branch to submit the code, unfortunately.
@yvdv-one sorry don't really have much free time those day. Can you create a PR? Thanks
@farfromrefug Thank you for responding. I created a fork, made the changes and created a PR.
Yves.
@yvdv-one thanks a lot! released under 3.0.1
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
The placeholder image is shown smaller than the actual image. Looking at the code, it seems that the stretch property is not used in setting the placeholder image on the fresco GenericDraweeHierarchyBuilder, resulting in the default scale CENTER_INSIDE.