diff --git a/packages/core/image-asset/index.android.ts b/packages/core/image-asset/index.android.ts index 055caeff60..66073a0089 100644 --- a/packages/core/image-asset/index.android.ts +++ b/packages/core/image-asset/index.android.ts @@ -26,6 +26,15 @@ export class ImageAsset extends ImageAssetBase { } public getImageAsync(callback: (image, error) => void) { + if (this.options) { + if (typeof this.options.width === 'string') { + this.options.width = parseInt(this.options.width, 10) || 0; + } + if (typeof this.options.height === 'string') { + this.options.height = parseInt(this.options.height, 10) || 0; + } + } + org.nativescript.widgets.Utils.loadImageAsync( ad.getApplicationContext(), this.android, @@ -42,4 +51,5 @@ export class ImageAsset extends ImageAssetBase { }) ); } + }