{ "id": "154686", "key": "TIMOB-20363", "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": "2016-02-03T16:26:33.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "engReviewed" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" }, { "id": "20827", "name": "Release 8.2.0", "archived": false, "released": true, "releaseDate": "2019-09-19" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-14T20:59:30.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Android only: If a button is added to a base view, and then that button should be obstructed by a view added to the base view because it was added after the button, the button will still show through.\r\n\r\nTest Case (be sure to include buttonTest.png at the root of the test project):\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar window = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n});\r\n\r\n// create a main view which will contain the button and the view\r\nvar mainViewContainer = Ti.UI.createView({\r\n\ttop: 0,\r\n\tleft: 0,\r\n\tright: 0,\r\n\tbottom:0,\r\n\tbackgroundColor: 'red'\r\n});\r\n\r\n// create a view which will obscure the button\r\nvar shouldObscureButton = Ti.UI.createView({\r\n\ttop: 0,\r\n\tleft: 0,\r\n\twidth: 200, \r\n\tbottom: 0,\r\n\tbackgroundColor: 'blue'\r\n});\r\n\r\n// create a button which is wider than the obscure view\r\nvar button = Ti.UI.createButton({\r\n\theight: 350,\r\n\twidth: 350,\r\n\tleft: 0,\r\n\tbackgroundImage: 'buttonTest.png',\r\n\tbackgroundColor: 'transparent'\r\n});\r\n\r\n// add the button to the main view container before the obscure view\r\nmainViewContainer.add(button);\r\n\r\n// add a view that should obscure the button after the button has been added\r\nmainViewContainer.add(shouldObscureButton);\r\n\r\n// add the main view to the window and open it\r\nwindow.add(mainViewContainer);\r\nwindow.open();\r\n\r\n{code}\r\n\r\nExpected results:\r\nThe button (green checkmark) should be partially obscured by the obstructing view (blue background). This is the behavior on iOS and Mobile Web.\r\n\r\nActual results:\r\nThe button appears on top of the obstructing view (blue background).", "attachment": [ { "id": "58129", "filename": "android-broken.png", "author": { "name": "mattmendick", "key": "mattmendick", "displayName": "Matt Mendick", "active": true, "timeZone": "America/New_York" }, "created": "2016-02-03T16:23:53.000+0000", "size": 185582, "mimeType": "image/png" }, { "id": "58127", "filename": "buttonTest.png", "author": { "name": "mattmendick", "key": "mattmendick", "displayName": "Matt Mendick", "active": true, "timeZone": "America/New_York" }, "created": "2016-02-03T16:24:29.000+0000", "size": 94481, "mimeType": "image/png" }, { "id": "58128", "filename": "ios-works.png", "author": { "name": "mattmendick", "key": "mattmendick", "displayName": "Matt Mendick", "active": true, "timeZone": "America/New_York" }, "created": "2016-02-03T16:23:53.000+0000", "size": 82355, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Buttons inside views appear on top of all other children", "creator": { "name": "mattmendick", "key": "mattmendick", "displayName": "Matt Mendick", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "mattmendick", "key": "mattmendick", "displayName": "Matt Mendick", "active": true, "timeZone": "America/New_York" }, "environment": "Found in:SDK 5.1.2.GA, and SDK 5.2.0.v20160202005354\r\nUsing Genymotion \"Google Nexus 7 2013 - 5.1.0 - API 22 - 1200x1920\", built with CLI version 5.0.6", "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": "375995", "author": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe observed the same issue as the reporter. The button appears on top of the children view on android but works as expected on iOS.\r\n\r\n*Testing Environment:*\r\nAppcelerator Studio, build: 4.4.0.201511241829\r\nAppcelerator Command-Line Interface, version 5.1.0\r\nTitanium Command-Line Interface, CLI version 5.0.5, \r\nTitanium SDK version : 5.1.2 GA\r\nMac OS X : 10.11.1 (EI Capitan)\r\nAndroid Emulator: Google Nexus 7-5.1.0\r\nAndroid device: Nexus 7(android 6)\r\niOS simulator: iPhone5s(iOS-9.1)\r\n\r\n*Test Code:*\r\nProvided by the reporter\r\n\r\n*Output:*\r\n[Simulator Output|http://postimg.org/image/kakyngc2t/]\r\n[Emulator Output|http://postimg.org/image/9fy8el6fj/]\r\n\r\n*Steps to reproduce:*\r\nCreate a classic project with the provided test code and run the app. Observe that the button image appears on top of all.\r\n\r\nThanks.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-04T07:51:51.000+0000", "updated": "2016-02-10T04:18:22.000+0000" }, { "id": "431865", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is only reproducible on Android 5.0 and above. This is because Android's native button implementation is set up to use a higher \"elevation\" (a concept introduced in API Level 21) than the other views.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-08T02:06:01.000+0000", "updated": "2017-12-08T02:06:01.000+0000" }, { "id": "432028", "author": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/9679", "updateAuthor": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "created": "2017-12-12T12:51:29.000+0000", "updated": "2017-12-12T12:51:29.000+0000" }, { "id": "434553", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Rejecting the change since it'll end up removing the button's drop-shadow effect on Android 5.0 and higher. We'll need to find an alternative solution.\r\n\r\nNote that Google implements the button's drop-shadow effective via the \"elevation\" property, but setting it to a higher elevation makes it appear above the other views. So, it's a design issue on Google's end that we need to find a work-around for.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-15T23:14:39.000+0000", "updated": "2018-02-15T23:14:39.000+0000" }, { "id": "451717", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reproducible with 8.2.0.GA. \r\n\r\nAxway Appcelerator Studio, build: 5.1.4.201909061933 \r\nmacOS : 10.14.6\r\nNode.js Version : 8.9.1\r\nnpm Version : 5.5.1\r\nAppcelerator CLI : 7.1.1\r\nTitanium CLI\r\nCLI Version : 5.2.1\r\nnode-appc Version : 0.2.49\r\n", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-30T18:30:00.000+0000", "updated": "2019-09-30T18:30:00.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }