{ "id": "110643", "key": "TIMOB-12993", "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": "15499", "description": "2013 Sprint 13 API", "name": "2013 Sprint 13 API", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "15111", "description": "2013 Sprint 13", "name": "2013 Sprint 13", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-20T21:28:26.000+0000", "created": "2013-03-05T19:52:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "exalture", "i0S", "module_button", "parity", "qe-testadded" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-06-19T12:44:21.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": "*Problem*\r\nall buttons and the view I create are not at the same order on android. On iPhone it's all correct. I Attached the screenshots.\r\n\r\nI create buttons and add them to scrollview the label I create a add usually to scrollview to, I tried it with a new subview, but without success.\r\n\r\nI add the view at line #120 this is the section title in grey on iphone.png. this is a normal cycle, it have to be there to on android.\r\n\r\n*Steps to Reproduce*\r\n1. Copy and paste code into app.js\r\n2. Run on android device or emulator\r\n3. Run on iOS simulator\r\n4. Notice the parity behavior\r\n\r\n{code:javascript} \r\nvar _json = {\r\n\t\"menu\" : [{\r\n\t\t\"name\" : \"Home\",\r\n\t\t\"link\" : \"../id/home-de-mobile\",\r\n\t\t\"linktarget\" : \"\",\r\n\t\t\"type\" : \"html\"\r\n\t}, {\r\n\t\t\"name\" : \"Datenschutz\",\r\n\t\t\"link\" : \"../id/86AE964D595138D2C12577CA003DF311?open&mobile=1\",\r\n\t\t\"linktarget\" : \"\",\r\n\t\t\"type\" : \"html\"\r\n\t}, {\r\n\t\t\"sectionheadline\" : \"www.wirtschaftsrat.de\",\r\n\t\t\"entries\" : [{\r\n\t\t\t\"name\" : \"Homepage\",\r\n\t\t\t\"link\" : \"../id/home-de\",\r\n\t\t\t\"linktarget\" : \"_blank\",\r\n\t\t\t\"type\" : \"html\"\r\n\t\t}, {\r\n\t\t\t\"name\" : \"50 Jahre Wirtschaftsrat\",\r\n\t\t\t\"link\" : \"../id/jubilaeum-de\",\r\n\t\t\t\"linktarget\" : \"_blank\",\r\n\t\t\t\"type\" : \"html\"\r\n\t\t}]\r\n\t}]\r\n};\r\n\r\nvar buttons = [];\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar menuWindow = Ti.UI.createView({\r\n\ttop : 41,\r\n\tlayout : \"vertical\",\r\n\tzIndex : 5000,\r\n\tvisible : true\r\n});\r\n\r\nvar menuScrollView = Ti.UI.createScrollView({\r\n\tbackgroundColor : \"#ccc\",\r\n\tscrollType : \"vertical\",\r\n\tlayout : \"vertical\",\r\n\tzIndex : 100\r\n});\r\n\r\nfor (x in _json.menu) {\r\n\tif ( typeof (_json.menu[x].sectionheadline) == \"undefined\") {\r\n\r\n\t\tbuttons[x] = Ti.UI.createButton({\r\n\t\t\ttitle : _json.menu[x].name,\r\n\t\t\tlink : _json.menu[x].link,\r\n\t\t\ttarget : _json.menu[x].linktarget,\r\n\t\t\ttype : _json.menu[x].type,\r\n\t\t\twidth : \"100%\",\r\n\t\t\theight : 50,\r\n\t\t\t// top : x * 50,\r\n\t\t\tleft : 0,\r\n\t\t\ttop : 0,\r\n\t\t\tcolor : \"#222\",\r\n\t\t\tzIndex : 102\r\n\t\t});\r\n\r\n\t\tbuttons[x].addEventListener(\"click\", function(e) {\r\n\r\n\t\t});\r\n\r\n\t\tmenuScrollView.add(buttons[x]);\r\n\t} else if ( typeof (_json.menu[x].sectionheadline) != \"undefined\") {\r\n\t\tvar sectiontitle = Ti.UI.createLabel({\r\n\t\t\theight : 50,\r\n\t\t\ttop : 0,\r\n\t\t\tcolor : \"#000\",\r\n\t\t\ttext : _json.menu[x].sectionheadline\r\n\t\t});\r\n\r\n\t\tvar sectionView = Ti.UI.createView({\r\n\t\t\theight : 50\r\n\t\t})\r\n\t\tsectionView.add(sectiontitle);\r\n\t\tmenuScrollView.add(sectionView);\r\n\r\n\t\tvar y = x;\r\n\t\tfor (var z in _json.menu[x].entries) {\r\n\t\t\ty++;\r\n\r\n\t\t\tbuttons[y] = Ti.UI.createButton({\r\n\t\t\t\ttitle : _json.menu[x].entries[z].name,\r\n\t\t\t\tlink : _json.menu[x].entries[z].link,\r\n\t\t\t\ttarget : _json.menu[x].entries[z].linktarget,\r\n\t\t\t\ttype : _json.menu[x].entries[z].type,\r\n\t\t\t\twidth : \"100%\",\r\n\t\t\t\theight : 50,\r\n\t\t\t\ttop : 0,\r\n\t\t\t\tleft : 0,\r\n\t\t\t\tcolor : \"#222\",\r\n\t\t\t\tzIndex : 102\r\n\t\t\t});\r\n\r\n\t\t\tbuttons[y].addEventListener(\"click\", function(e) {\r\n\r\n\t\t\t});\r\n\r\n\t\t\tmenuScrollView.add(buttons[y]);\r\n\t\t}\r\n\r\n\t}\r\n}\r\n\r\nmenuWindow.add(menuScrollView);\r\n\r\nwin.add(menuWindow);\r\nwin.open();\r\n{code} \r\n\r\n\r\n", "attachment": [ { "id": "35913", "filename": "android.png", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-03-05T19:53:38.000+0000", "size": 281680, "mimeType": "image/png" }, { "id": "35914", "filename": "iphone.PNG", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-03-05T19:53:38.000+0000", "size": 111905, "mimeType": "image/png" } ], "flagged": false, "summary": "android: button/view layout not consistent between android and iOS", "creator": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 3.1.0.201303032333\r\n\r\nTested on:\r\nAndroid (device) 4.1.1\r\nand iOS simulator 6.0\r\n\r\nTi SDK: 3.1.0.v20130303194855", "comment": { "comments": [ { "id": "241009", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Alexander, when trying to reproduce this issue and pasting the given code into an app.js, I was unable to produce anything. When creating a bug, please provide a concise, reproducible test case which is able to be pasted directly into an app.js and clearly shows the issue. This way I can more quickly determine the validity of the issue and pass along to engineering. Please edit the code above to show the error as well as provide clear steps to reproduce the issue.\n\nThank you,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-06T20:50:09.000+0000", "updated": "2013-03-06T20:50:09.000+0000" }, { "id": "241117", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please reopen the bug, I change the code example.", "updateAuthor": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-03-07T08:38:07.000+0000", "updated": "2013-03-07T08:38:07.000+0000" }, { "id": "241152", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you for the edit Alexander, will review and get back to you", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T16:32:26.000+0000", "updated": "2013-03-07T16:32:26.000+0000" }, { "id": "241178", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed parity behavior, moved to Ti-Mobile", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T19:01:37.000+0000", "updated": "2013-03-07T19:01:37.000+0000" }, { "id": "253602", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "body": "3.2.0.v20130522185622\r\n\r\nstill the same problem.", "updateAuthor": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-23T08:15:07.000+0000", "updated": "2013-05-23T08:15:07.000+0000" }, { "id": "256628", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Since controls doesn't overlap in vertical and horizontal layouts, we shouldn't be sorting controls based on zOrder, the original order should be preserved.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4363", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-06-07T15:02:43.000+0000", "updated": "2013-06-07T15:02:43.000+0000" }, { "id": "276385", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. We now see parity between android & IOS regarding this issue.\r\nThus closing.\r\n\r\nEnvironment:\r\nAppcel Studio : 3.2.0.201310230601\r\nTi SDK : 3.2.0.v20131022171645\r\nMac OSX : 10.8.5\r\nCLI - 3.2.0 with hash 72f7426b4ee6c2d2883c666d5b7e03906a16012f\r\nAndroid emulator : 4.1.2\r\nIOS simulator : iphone retina(3.5 inch)", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T18:17:09.000+0000", "updated": "2013-10-23T18:17:09.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }