mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #2128 from NativeScript/android-background-reset
android background reset fixed
This commit is contained in:
@ -241,13 +241,13 @@ export module ad {
|
||||
var bkg = <any>nativeView.getBackground();
|
||||
|
||||
if (v instanceof button.Button && !types.isNullOrUndefined(bkg) && types.isFunction(bkg.setColorFilter) &&
|
||||
v.borderWidth === 0 && v.borderRadius === 0 &&
|
||||
v.borderWidth === 0 && v.borderRadius === 0 && !clipPathValue &&
|
||||
types.isNullOrUndefined(v.style._getValue(style.backgroundImageProperty)) &&
|
||||
!types.isNullOrUndefined(v.style._getValue(style.backgroundColorProperty))) {
|
||||
let backgroundColor = bkg.backgroundColor = v.style._getValue(style.backgroundColorProperty).android;
|
||||
bkg.setColorFilter(backgroundColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
bkg.backgroundColor = backgroundColor;
|
||||
} else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty() || !clipPathValue.isEmpty()) {
|
||||
} else if (v.borderWidth !== 0 || v.borderRadius !== 0 || !backgroundValue.isEmpty() || clipPathValue) {
|
||||
|
||||
if (!(bkg instanceof BorderDrawableClass)) {
|
||||
bkg = new BorderDrawableClass();
|
||||
|
Reference in New Issue
Block a user