{ "id": "127026", "key": "TIMOB-16540", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-03-26T21:57:41.000+0000", "created": "2014-03-03T07:18:43.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-3.2.2", "supportTeam", "triage" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T20:37:47.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "iOS7: TableViewRow: leftImage property renders improper image allignment.\r\nIt works fine on iOS 6 device(iPOD touch iOS:6.1.3). Issue also occurs on 3.2.1.GA,3.2.0.GA sdk\r\n\r\nSteps to reproduce:\r\n1. Run the below app.\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'red'\r\n});\r\ncreateTableRow = function(args){\r\n\t\t // save the title for our own use\r\n\t\t var title = args.title;\r\n\t\t args.title = '';\r\n\t\t args.left = 42;\r\n\t\t args.height = 40;\r\n\t\t \r\n\t\t var row = Ti.UI.createTableViewRow(args);\r\n\t\t \r\n\t\t var label = Ti.UI.createLabel({\r\n\t\t backgroundColor: 'pink',\r\n\t\t text: title,\r\n\t\t textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n\t\t width: Ti.UI.FILL,\r\n\t\t height: args.height - 5,\r\n\t\t left: args.left,\r\n\t\t font: { fontSize: 17, fontWeight: 'bold'},\r\n\t\t });\r\n\t\t \r\n\t\t row.add(label);\r\n\t\t \r\n\t\t row.label_title = title;\r\n\t\t \r\n\t\t return row;\r\n\t\t};\r\n\t\t \r\n\t\tvar rows = [];\r\n\t\trows.push( createTableRow({ title: 'table', leftImage: '/KS_nav_ui.png'}) );\r\n\t\trows.push( createTableRow({ title: 'row', leftImage: '/KS_nav_ui.png'}) );\r\n\t\trows.push( createTableRow({ title: 'rock' }) );\r\n\t\trows.push( createTableRow({ title: 'car', leftImage: '/KS_nav_ui.png'}) );\r\n\t\trows.push( createTableRow({ title: 'tab' }) );\r\n\t\trows.push( createTableRow({ title: 'row boat', leftImage: '/KS_nav_ui.png'}) );\r\n\t\trows.push( createTableRow({ title: 'table row', leftImage: '/KS_nav_ui.png'}) );\r\n\t\trows.push( createTableRow({ title: 'test', leftImage: '/KS_nav_ui.png'}) );\r\n\t\trows.push( createTableRow({ title: 'apple' }) );\r\n\t\t \r\n\t\tvar search = Ti.UI.createSearchBar({\r\n\t\t showCancel: false\r\n\t\t});\r\n\t\t \r\n\t\tvar table = Ti.UI.createTableView({\r\n\t\t data: rows,\r\n\t\t search: search,\r\n\t\t searchHidden: false,\r\n\t\t filterAttribute: 'label_title',\r\n\t\t filterCaseInsensitive: true\r\n\t\t});\r\n\t\t \r\n\t\twin.add(table);\r\n\t\t \r\n\t\twin.open();\r\n\r\n{code}\r\n\r\nExpected:\r\nleft image in tableviewrow should be properly alligned.\r\n\r\nActual:\r\nleft image overlaps with the label. Screenshots are attached for iOS7 and iOS:6 devices.\r\n", "attachment": [ { "id": "46279", "filename": "row_iOS_6.PNG", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-03-03T07:18:43.000+0000", "size": 61569, "mimeType": "image/png" }, { "id": "46280", "filename": "row_iOS_7.PNG", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-03-03T07:18:43.000+0000", "size": 52521, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS7: TableViewRow: leftImage property renders improper image alignment", "creator": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Device : iPod touch 2 , iOS version: 7.1\r\nSDK: 3.2.2.v20140221161255\r\nCLI version : 3.2.1\r\nOS : MAC OSX 10.9\r\nAlloy: 1.3.1\r\nACS: 1.0.12\r\nnpm:1.3.2\r\nAppcelerator Studio, build: 3.2.1.201402061120\r\ntitanium-code-processor: 1.1.0\r\nXCode : 5.1 Beta 5", "comment": { "comments": [ { "id": "298666", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~egomez] Here is the solution that would work on both ios 6 & 7\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'red'\r\n});\r\ncreateTableRow = function(args){\r\n\t// save the title for our own use\r\n\tvar title = args.title;\r\n\targs.title = '';\r\n\targs.left = 45;\r\n\targs.height = 40;\r\n\tvar leftImage = args.leftImage;\r\n\targs.leftImage = '';\r\n\r\n\tvar container = Ti.UI.createView({\r\n\t\tlayout : \"horizontal\",\r\n\t\twidth : Ti.UI.FILL,\r\n\t\theight : Ti.UI.FILL,\r\n\t});\r\n\r\n\t\r\n\tif (leftImage) {\r\n\t\tvar image = Ti.UI.createImageView({\r\n\t\t\timage:leftImage,\r\n\t\t\twidth: 40,\r\n\t\t\theight: args.height - 5\r\n\t\t});\r\n\t\targs.left= 5;\r\n\t\tTi.API.info(\"args.left : \" + args.left);\r\n\t\tcontainer.add(image);\r\n\t}\r\n\t\r\n\tvar row = Ti.UI.createTableViewRow(args);\r\n\tvar label = Ti.UI.createLabel({\r\n\t\tbackgroundColor: 'pink',\r\n\t\ttext: title,\r\n\t\ttextAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n\t\twidth: Ti.UI.FILL,\r\n\t\theight: args.height - 5,\r\n\t\tleft: args.left,\r\n\t\tfont: { fontSize: 17, fontWeight: 'bold'},\r\n\t});\r\n\t\r\n\r\n\t\r\n\tcontainer.add(label)\r\n\trow.add(container);\r\n\r\n\trow.label_title = title;\r\n\r\n\treturn row;\r\n};\r\n\r\nvar rows = [];\r\nrows.push( createTableRow({ title: 'table', leftImage: '/KS_nav_ui.png'}) );\r\nrows.push( createTableRow({ title: 'row', leftImage: '/KS_nav_ui.png'}) );\r\nrows.push( createTableRow({ title: 'rock' }) );\r\nrows.push( createTableRow({ title: 'car', leftImage: '/KS_nav_ui.png'}) );\r\nrows.push( createTableRow({ title: 'tab' }) );\r\nrows.push( createTableRow({ title: 'row boat', leftImage: '/KS_nav_ui.png'}) );\r\nrows.push( createTableRow({ title: 'table row', leftImage: '/KS_nav_ui.png'}) );\r\nrows.push( createTableRow({ title: 'test', leftImage: '/KS_nav_ui.png'}) );\r\nrows.push( createTableRow({ title: 'apple' }) );\r\n\r\nvar search = Ti.UI.createSearchBar({\r\n\tshowCancel: false\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\tdata: rows,\r\n\tsearch: search,\r\n\tsearchHidden: false,\r\n\tfilterAttribute: 'label_title',\r\n\tfilterCaseInsensitive: true\r\n});\r\n\r\nwin.add(table);\r\n\r\nwin.open();\r\n{code}\r\n\r\n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-25T20:23:14.000+0000", "updated": "2014-03-25T20:23:24.000+0000" }, { "id": "298880", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Use leftImage, rightImage properties with title property.\r\n\r\nIf you are creating a custom layout, then don't use the built in properties, rather create your own ImageViews to show images", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-26T21:57:41.000+0000", "updated": "2014-03-26T21:57:41.000+0000" }, { "id": "298973", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~vduggal]\n\nIs there a recommended approach for adding the rows to table using insertRowBefore method. Please see the above code posted the 19/Mar/14. Because of this Client is getting the alignment issues. Is there any workaround for this?", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-27T15:15:48.000+0000", "updated": "2014-03-27T15:15:48.000+0000" }, { "id": "413941", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T20:37:47.000+0000", "updated": "2017-03-20T20:37:47.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }