diff --git a/tests/app/ui/button/button-tests.ts b/tests/app/ui/button/button-tests.ts index e9f4caeff..1af31325d 100644 --- a/tests/app/ui/button/button-tests.ts +++ b/tests/app/ui/button/button-tests.ts @@ -404,3 +404,18 @@ export function test_setting_formattedText_With_UnknownFont_DoesNotCrash() { TKUnit.waitUntilReady(() => btn.isLayoutValid); }); } + +export function test_Native_Background_Color_BorderRadius_Change() { + let view = new buttonModule.Button(); + view.text = "TEST"; + helper.buildUIAndRunTest(view, function (views: Array) { + let page = views[1]; + page.css = ".border { background-color: #00FF00; border-radius: 1; } .colorfilter { background-color: #FF0000; }"; + view.className = "border"; + helper.waitUntilLayoutReady(view); + TKUnit.assertEqual(buttonTestsNative.getNativeBackgroundColor(view).hex, "#00FF00"); + view.className = "colorfilter"; + helper.waitUntilLayoutReady(view); + TKUnit.assertEqual(buttonTestsNative.getNativeBackgroundColor(view).hex, "#FF0000"); + }); +} diff --git a/tns-core-modules/ui/styling/background.android.ts b/tns-core-modules/ui/styling/background.android.ts index 9f3e9ed77..123357b5d 100644 --- a/tns-core-modules/ui/styling/background.android.ts +++ b/tns-core-modules/ui/styling/background.android.ts @@ -50,6 +50,7 @@ export module ad { if (isSetColorFilterOnlyWidget(nativeView) && drawable + && !(drawable instanceof org.nativescript.widgets.BorderDrawable) && !background.hasBorderWidth() && !background.hasBorderRadius() && !background.clipPath