{ "id": "170168", "key": "TIMOB-25461", "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": [], "resolution": null, "resolutiondate": null, "created": "2017-10-29T10:52:53.000+0000", "priority": null, "labels": [ "android", "engSchedule", "regression" ], "versions": [], "issuelinks": [ { "id": "56147", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "170293", "key": "TIMOB-25505", "fields": { "summary": "Android: Transparent theme not working in SDK 6.3.0", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-06-30T14:44:24.000+0000", "status": { "description": "Submitted for code review", "name": "In Review", "id": "10003", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Here is my code:\r\n\r\n{code:java}\r\n\".avatar-group\": {\r\n top: 43,\r\n width: 100,\r\n height: 100\r\n}\r\n\r\n \".avatar-radius\": {\r\n width: 100,\r\n height: 100,\r\n borderRadius: 50,\r\n backgroundColor: \"#33FFFFFF\"\r\n }\r\n\r\n \"#Avatar\": {\r\n width: 90,\r\n height: 90,\r\n borderWidth: 3,\r\n borderColor: \"white\",\r\n borderRadius: 46.5,\r\n backgroundColor: Alloy.CFG.themes.colors.placeholder\r\n }\r\n{code}\r\n\r\nAs you can see in attached screenshot, the View with class \"avatar-radius\" cut the current View and the container Window showing the previous activity.\r\n\r\nOn iOS is working fine.", "attachment": [ { "id": "63500", "filename": "Android.png", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-29T21:33:54.000+0000", "size": 30889, "mimeType": "image/png" }, { "id": "63499", "filename": "iOS.png", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-29T21:33:45.000+0000", "size": 24792, "mimeType": "image/png" }, { "id": "63497", "filename": "Screenshot_20171028-170024.png", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-29T10:52:14.000+0000", "size": 138262, "mimeType": "image/png" }, { "id": "63498", "filename": "test.zip", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-29T21:33:06.000+0000", "size": 9410974, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android - HEX backgroundColor with alpha channel act as a mask", "creator": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Ti SDK: 6.3.0.v20171027170556\r\nTi CLI: 6.2.4", "closedSprints": [ { "id": 1000, "state": "closed", "name": "2018 Sprint 04 SDK", "startDate": "2018-02-12T04:23:01.913Z", "endDate": "2018-02-26T04:23:00.000Z", "completeDate": "2018-02-26T19:36:01.769Z", "originBoardId": 114 }, { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "429794", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please share a full sample code or a sample project with only the problem section. Also, send the behavior screenshot in iOS. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-10-29T20:53:08.000+0000", "updated": "2017-10-29T20:53:08.000+0000" }, { "id": "429796", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "body": "Here is the sample app:\r\n [^test.zip] \r\n\r\nthat produces two different behavior on Android (wrong) and iOS (correct):\r\n !iOS.png|thumbnail! \r\n !Android.png|thumbnail! ", "updateAuthor": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-29T21:33:56.000+0000", "updated": "2017-10-29T21:33:56.000+0000" }, { "id": "431098", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9588", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2017-11-21T08:55:28.000+0000", "updated": "2017-11-21T08:55:28.000+0000" }, { "id": "431601", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ybanev] would we be able to include this fix in SDk 7.0.1", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-01T17:34:06.000+0000", "updated": "2017-12-01T17:34:06.000+0000" }, { "id": "434668", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~Andrea.Vitale], is your ultimate goal here is to draw circles?\r\n\r\nIf so, then we're adding \"radial\" gradient support to Android in Titanium 7.1.0 (iOS already supports this) which can be used to draw solid circles/rings too. We're offering this to developers as an alternative to using \"borderRadius\" to draw circles, which has been proven to be buggy on Google's end.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-20T19:48:02.000+0000", "updated": "2018-02-20T19:48:02.000+0000" }, { "id": "434673", "author": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "body": "Joshua, usually I use borderRadius to create a circle view. To fix this issue, at the moment, on Android I use a CardView. In this case: yes, I would like to draw circle with a semi-transparent white background under the circular avatar and a radial gradient could be a valid option.", "updateAuthor": { "name": "Andrea.Vitale", "key": "andrea.vitale", "displayName": "Andrea Vitale", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-20T21:35:14.000+0000", "updated": "2018-02-20T21:35:14.000+0000" }, { "id": "434674", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Okay. Just note that drawing a radial gradient won't clip the view's child contents from within the circle. It merely paints a circle in the view's background, but that seems like what you're really after.\r\n\r\nSo, the idea is to avoid the \"borderRadius\" feature and use \"backgroundGradient\" set to \"radial\" instead. This way, the view remains square/rectangular and you're drawing a circle in its background instead (outer edge of circle will be transparent by default). So, I believe the following will be a close equivalent to what you're doing. I tested it on Android's upcoming radial gradient feature and the below exactly matches what I see on iOS.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({ backgroundColor: \"blue\" });\r\nwindow.add(Ti.UI.createView(\r\n{\r\n\twidth: 100,\r\n\theight: 100,\r\n\tbackgroundGradient:\r\n\t{\r\n\t\ttype: \"radial\",\r\n\t\tstartPoint: { x: 50, y: 50 },\r\n\t\tstartRadius: 0,\r\n\t\tendRadius: 50,\r\n\t\tcolors: [ \"#33FFFFFF\", \"#33FFFFFF\" ],\r\n\t},\r\n}));\r\nwindow.add(Ti.UI.createView(\r\n{\r\n\twidth: 90,\r\n\theight: 90,\r\n\tbackgroundGradient:\r\n\t{\r\n\t\ttype: \"radial\",\r\n\t\tstartPoint: { x: 45, y: 45 },\r\n\t\tstartRadius: 0,\r\n\t\tendRadius: 45,\r\n\t\tcolors: [ \"white\", \"white\" ],\r\n\t},\r\n}));\r\nwindow.open();\r\n{code}\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-20T22:08:04.000+0000", "updated": "2018-02-20T22:09:14.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }