diff --git a/ui/styling/stylers.android.ts b/ui/styling/stylers.android.ts index 3b4264e19..763b65732 100644 --- a/ui/styling/stylers.android.ts +++ b/ui/styling/stylers.android.ts @@ -100,6 +100,12 @@ function onBorderPropertyChanged(v: view.View) { return; } + var value = v.style._getValue(styleModule.backgroundImageSourceProperty); + + if ((v.borderWidth === 0 && v.borderRadius === 0) || types.isNullOrUndefined(v.backgroundColor) || types.isNullOrUndefined(value)) { + return; + } + var nativeView = v._nativeView; var bkg = nativeView.getBackground(); @@ -118,7 +124,6 @@ function onBorderPropertyChanged(v: view.View) { bkg.borderColor = v.borderColor ? v.borderColor.android : android.graphics.Color.TRANSPARENT; bkg.backgroundColor = v.backgroundColor ? v.backgroundColor.android : android.graphics.Color.TRANSPARENT; - var value = v.style._getValue(styleModule.backgroundImageSourceProperty); bkg.bitmap = value ? value.android : undefined; }