Skip to content

Commit c66f8d5

Browse files
committed
fix(android): ensure a hierarchy is set for the default “stretch” property value
1 parent c767cd8 commit c66f8d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/image.android.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ export const needRequestImage = function (target: any, propertyKey: string | Sym
317317
descriptor.value = function (...args: any[]) {
318318
if (!this._canRequestImage) {
319319
this._needRequestImage = true;
320+
// we need to ensure a hierarchy is set or the default aspect ratio wont be set
321+
// because aspectFit is the default (wanted) but then we wont go into stretchProperty.setNative
322+
this._needUpdateHierarchy = true;
320323
return;
321324
}
322325
return originalMethod.apply(this, args);

0 commit comments

Comments
 (0)