Skip to content

Commit bd88788

Browse files
committed
Merge pull request NativeScript#2128 from NativeScript/android-background-reset
android background reset fixed
2 parents f10666e + 60a6c9b commit bd88788

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/styling/background.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ export module ad {
241241
var bkg = <any>nativeView.getBackground();
242242

243243
if (v instanceof button.Button && !types.isNullOrUndefined(bkg) && types.isFunction(bkg.setColorFilter) &&
244-
v.borderWidth === 0 && v.borderRadius === 0 &&
244+
v.borderWidth === 0 && v.borderRadius === 0 && !clipPathValue &&
245245
types.isNullOrUndefined(v.style._getValue(style.backgroundImageProperty)) &&
246246
!types.isNullOrUndefined(v.style._getValue(style.backgroundColorProperty))) {
247247
let backgroundColor = bkg.backgroundColor = v.style._getValue(style.backgroundColorProperty).android;
248248
bkg.setColorFilter(backgroundColor, android.graphics.PorterDuff.Mode.SRC_IN);
249249
bkg.backgroundColor = backgroundColor;
250-
} else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty() || !clipPathValue.isEmpty()) {
250+
} else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty() || clipPathValue) {
251251

252252
if (!(bkg instanceof BorderDrawableClass)) {
253253
bkg = new BorderDrawableClass();

0 commit comments

Comments
 (0)