From 017c4e0c62eae085a0902e02a50562e9be54f446 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Mon, 20 Jun 2016 16:15:13 +0300 Subject: [PATCH] Fixes for tests failing in ui-tests-app --- .../main/java/org/nativescript/widgets/BorderDrawable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/widgets/src/main/java/org/nativescript/widgets/BorderDrawable.java b/android/widgets/src/main/java/org/nativescript/widgets/BorderDrawable.java index 08b3ad35e..a8d46cf9d 100644 --- a/android/widgets/src/main/java/org/nativescript/widgets/BorderDrawable.java +++ b/android/widgets/src/main/java/org/nativescript/widgets/BorderDrawable.java @@ -169,7 +169,7 @@ public class BorderDrawable extends ColorDrawable { public void draw(Canvas canvas) { Rect bounds = this.getBounds(); float borderWidth = this.borderWidth * this.density; - float halfBorderWidth = borderWidth / 2; + float halfBorderWidth = borderWidth / 2.0f; // We will inset background colors and images so antialiasing will not color pixels outside the border. // If the border is transparent we will backoff less, and we will not backoff more than half a pixel or half the border width. @@ -291,7 +291,7 @@ public class BorderDrawable extends ColorDrawable { float bottom; switch (functionName){ case "rect": - arr = value.split("\\s+"); + arr = value.split("[\\s,]+"); top = cssValueToDevicePixels(arr[0], bounds.top, density); left = cssValueToDevicePixels(arr[1], bounds.left, density); bottom = cssValueToDevicePixels(arr[2], bounds.bottom, density);