{ "id": "103909", "key": "TIMOB-14008", "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": "2012-10-25T10:17:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "layout", "parity", "zindex" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "29106", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "97458", "key": "TIMOB-10364", "fields": { "summary": "Android: Setting zIndex on views inside ScrollView doesn't work", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2016-06-30T04:37:07.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": "*Expected result*\r\nThe red view should be located on the black view.\r\n\r\n*Actual result*\r\nThe black view is missing.\r\n\r\n*Note*\r\nWorks on iOS (both the red view and black view show), but not Android.\r\n\r\n*Test case*\r\n{code:javascript}var win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#fff',\r\n\tnavBarHidden : true,\r\n\texitOnClose : true\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\tlayout : 'vertical'\r\n});\r\n\r\nview.add(Ti.UI.createView({\r\n\twidth : 200,\r\n\theight : 50,\r\n\tbackgroundColor : 'red',\r\n\tzIndex : 1\r\n}));\r\n\r\nview.add(Ti.UI.createView({\r\n\theight : 50,\r\n\tbackgroundColor : 'black',\r\n\ttop : -15\r\n}));\r\n\r\nwin.add(view)\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: layout vertical and zIndex problem", "creator": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "subtasks": [], "reporter": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "environment": "SDK 2.1.3 GA, 3.1 GA, 3.2 CI\r\nAndroid 4.x on Google Nexus 7\r\nAndroid 2.3.6 on Samsung Galaxy S2", "comment": { "comments": [ { "id": "254376", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on Samsung Galaxy S2 Android 2.3.6 with Ti SDK 3.1 GA and 3.2 CI. Works as expected on iOS 6 simulator.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-28T20:31:00.000+0000", "updated": "2013-05-28T20:31:00.000+0000" }, { "id": "267087", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Another, maybe more simple test case:\r\n\r\n{code}\r\nvar w = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n layout: 'vertical'\r\n});\r\n\r\nvar greenFirst = Ti.UI.createView({\r\n height: 50,\r\n backgroundColor: 'green',\r\n zIndex: 1\r\n});\r\n\r\nvar redSecond = Ti.UI.createView({\r\n height: 50,\r\n backgroundColor: 'red'\r\n});\r\n\r\nw.add(greenFirst);\r\nw.add(redSecond);\r\n\r\nw.open();\r\n{code}\r\n\r\nOn iOS green indeed comes first, but on Android (Samsung Galaxy S2, Android 4.2.3 and SDK 3.1.2.GA) green comes second as soon as you set a zIndex on it.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-08-19T08:25:08.000+0000", "updated": "2013-08-19T08:25:08.000+0000" }, { "id": "338180", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Hi guys, this still happens on Ti SDK 3.4.1.GA - for the sake of parity it would be nice if Android respects zIndex as iOS does on vertical layout windows.\r\n\r\nThis is set to high since a long time ago. Can we prioritize this?\r\n\r\n\r\n", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2015-01-07T18:27:15.000+0000", "updated": "2015-01-07T18:27:15.000+0000" }, { "id": "338183", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Community QA on this since 2012: https://developer.appcelerator.com/question/148341/zindex-effect-vertical-positioning-on-android", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2015-01-07T18:31:14.000+0000", "updated": "2015-01-07T18:31:14.000+0000" }, { "id": "354553", "author": { "name": "karaoak", "key": "karaoak", "displayName": "Frank Eijking", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still an issue in Ti SDK 4.0.0.GA", "updateAuthor": { "name": "karaoak", "key": "karaoak", "displayName": "Frank Eijking", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-08T13:28:18.000+0000", "updated": "2015-06-08T13:28:18.000+0000" }, { "id": "356618", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm unable to reproduce this issue on master. I tried both test cases and the views are displayed correctly.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-07-01T21:13:15.000+0000", "updated": "2015-07-01T21:13:15.000+0000" }, { "id": "356667", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "If you run this, you will see that there is actually more Red and that it was hidden by the black strip (which is now transparent red). When the it is not transparent, the Red should actually be on top of the black strip since the Red portion has zIndex 1 \r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#fff',\r\n\tnavBarHidden : true,\r\n\texitOnClose : true\r\n});\r\n \r\nvar view = Ti.UI.createView({\r\n\tlayout : 'vertical'\r\n});\r\n \r\nview.add(Ti.UI.createView({\r\n\twidth : 200,\r\n\theight : 50,\r\n\tbackgroundColor : 'red',\r\n\tzIndex : 1\r\n}));\r\n \r\nview.add(Ti.UI.createView({\r\n\theight : 50,\r\n\tbackgroundColor : '#5f40',\r\n\ttop : -15\r\n}));\r\n \r\nwin.add(view)\r\n \r\nwin.open();\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-07-02T04:22:54.000+0000", "updated": "2015-07-02T04:22:54.000+0000" }, { "id": "356668", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-07-02T04:25:48.000+0000", "updated": "2015-07-02T04:25:48.000+0000" }, { "id": "361370", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "'elevation' might be the best approach to address this requirement. Will be closing this ticket, let me know if you feel otherwise.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-27T06:13:35.000+0000", "updated": "2015-08-27T06:13:35.000+0000" }, { "id": "361375", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Well, unless {{elevation}} will replace {{zIndex}} for Android this ticket is still a valid parity-bug.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-08-27T06:45:51.000+0000", "updated": "2015-08-27T06:45:51.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }