{ "id": "172423", "key": "TIMOB-26453", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-11-29T19:10:42.000+0000", "created": "2018-10-11T07:48:40.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "defect", "parity", "regression" ], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2018-11-29T19:11:10.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "According to the doc (https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-borderWidth), default value of {{borderWidth}} of view should be 0 as long as {{borderColor}} is not set. However, looks like this default value is not respected on Android, if {{borderRadius}} of the view is defined.\r\n\r\nSample code to reproduce (paste the following code to a new mobile app project and run it on Android):\r\n{code:javascript}\r\nvar win = Titanium.UI.createWindow({\r\n\theight: Titanium.UI.FILL,\r\n\twidth: Titanium.UI.FILL,\r\n\tlayout: 'vertical',\r\n\tbackgroundColor: '#FFFFFF'\r\n});\r\n\r\nvar view1 = Titanium.UI.createView({\r\n\ttop: 20,\r\n\theight: 100,\r\n\twidth: 280,\r\n\tbackgroundColor: '#000000'\r\n\t// No borderRadius\r\n});\r\nview1.add(Titanium.UI.createLabel({\r\n\tcolor: '#FF0000',\r\n\ttext: 'Click here to test!'\r\n}));\r\nview1.addEventListener('click', function() {\r\n\tview1.setBackgroundColor('#00FFFF');\r\n});\r\n\r\nvar view2 = Titanium.UI.createView({\r\n\ttop: 20,\r\n\theight: 100,\r\n\twidth: 280,\r\n\tbackgroundColor: '#000000',\r\n\tborderRadius: 5\r\n});\r\nview2.add(Titanium.UI.createLabel({\r\n\tcolor: '#FF0000',\r\n\ttext: 'Click here to test!'\r\n}));\r\nview2.addEventListener('click', function() {\r\n\tview2.setBackgroundColor('#00FFFF');\r\n});\r\n\r\nwin.add(view1);\r\nwin.add(view2);\r\n\r\nwin.open();\r\n{code}\r\n\r\nAfter launching the sample app, click the two buttons (views) on the screen one by one and their background colour will change. Then it can be clearly observed that the actual border width of the second view is not 0 (the default value specified in doc), since we can see black border around it.\r\n\r\nBy the way, on iOS the actual behaviour matches well with the doc. There is no black border around any view after the background colour gets changed.", "attachment": [], "flagged": false, "summary": "Android: default value of borderWidth of view is not respected, if borderRadius is set (but no borderColor)", "creator": { "name": "mwenli", "key": "mwenli", "displayName": "Ma Wenli", "active": true, "timeZone": "Asia/Hong_Kong" }, "subtasks": [], "reporter": { "name": "mwenli", "key": "mwenli", "displayName": "Ma Wenli", "active": true, "timeZone": "Asia/Hong_Kong" }, "environment": "Titanium SDK 7.4.0.GA\r\nAny Android platform", "closedSprints": [ { "id": 1095, "state": "closed", "name": "2018 Sprint 24", "startDate": "2018-11-19T05:35:58.310Z", "endDate": "2018-12-03T05:35:00.000Z", "completeDate": "2018-12-03T16:28:57.549Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "442984", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "That's a regression in 7.0.0.GA when a default width for border was added. Introduced by me with this PR: \r\nhttps://github.com/appcelerator/titanium_mobile/pull/9510\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/10402", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-10-26T13:50:13.000+0000", "updated": "2018-10-26T14:53:11.000+0000" }, { "id": "443751", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR passed. Waiting for CR to merge", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-19T18:14:04.000+0000", "updated": "2018-11-19T18:14:04.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }