From ab8e1179eb099c1e187765f770b561b3b17dab05 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Thu, 14 Jan 2016 11:00:28 +0200 Subject: [PATCH] page background fixed --- ui/styling/background.android.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ui/styling/background.android.ts b/ui/styling/background.android.ts index 792ef156f..962bb5e3e 100644 --- a/ui/styling/background.android.ts +++ b/ui/styling/background.android.ts @@ -155,12 +155,11 @@ export module ad { var borderWidth = v.borderWidth; var bkg = nativeView.getBackground(); - if (!types.isNullOrUndefined(bkg) && v.borderWidth === 0 && v.borderRadius === 0 && - !v.style._getValue(style.backgroundImageProperty) && - v.style._getValue(style.backgroundColorProperty)) { - if (bkg && bkg.setColorFilter) { - bkg.setColorFilter(v.style._getValue(style.backgroundColorProperty).android, android.graphics.PorterDuff.Mode.SRC_IN); - } + if (v instanceof btn.Button && !types.isNullOrUndefined(bkg) && types.isFunction(bkg.setColorFilter) && + v.borderWidth === 0 && v.borderRadius === 0 && + types.isNullOrUndefined(v.style._getValue(style.backgroundImageProperty)) && + !types.isNullOrUndefined(v.style._getValue(style.backgroundColorProperty))) { + bkg.setColorFilter(v.style._getValue(style.backgroundColorProperty).android, android.graphics.PorterDuff.Mode.SRC_IN); } else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty()) { if (!(bkg instanceof dts.ad.BorderDrawable)) {