Skip to content

Commit ab8e117

Browse files
author
Vladimir Enchev
committed
page background fixed
1 parent 3d97499 commit ab8e117

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ui/styling/background.android.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,11 @@ export module ad {
155155
var borderWidth = v.borderWidth;
156156
var bkg = <any>nativeView.getBackground();
157157

158-
if (!types.isNullOrUndefined(bkg) && v.borderWidth === 0 && v.borderRadius === 0 &&
159-
!v.style._getValue(style.backgroundImageProperty) &&
160-
v.style._getValue(style.backgroundColorProperty)) {
161-
if (bkg && bkg.setColorFilter) {
162-
bkg.setColorFilter(v.style._getValue(style.backgroundColorProperty).android, android.graphics.PorterDuff.Mode.SRC_IN);
163-
}
158+
if (v instanceof btn.Button && !types.isNullOrUndefined(bkg) && types.isFunction(bkg.setColorFilter) &&
159+
v.borderWidth === 0 && v.borderRadius === 0 &&
160+
types.isNullOrUndefined(v.style._getValue(style.backgroundImageProperty)) &&
161+
!types.isNullOrUndefined(v.style._getValue(style.backgroundColorProperty))) {
162+
bkg.setColorFilter(v.style._getValue(style.backgroundColorProperty).android, android.graphics.PorterDuff.Mode.SRC_IN);
164163
} else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty()) {
165164

166165
if (!(bkg instanceof dts.ad.BorderDrawable)) {

0 commit comments

Comments
 (0)