From 4673b97eae482fcb5612cba67b8b921c1aa84d17 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Fri, 12 Jun 2015 15:15:50 +0300 Subject: [PATCH] android styler fixed --- ui/styling/stylers.android.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; }