{ "id": "115187", "key": "AC-2015", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-05-30T17:58:38.000+0000", "created": "2013-05-30T14:47:09.000+0000", "labels": [ "Android", "bug", "label" ], "versions": [], "issuelinks": [], "assignee": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "updated": "2016-03-08T07:40:57.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When the label's property ellipsize is set true, if the text has a line break '\\n', the property doesn't work.\r\n\r\nSteps to reproduce:\r\n\r\n1 - Create a label with a fixed width and height and ellipsize set true.\r\n2 - Put a long text in it.\r\n\r\nIF there is no \\n in the text, the label will get ellipsized with \"...\" .\r\nIF there is a \\n in the text, it won't.\r\n\r\n\r\nTi.UI.createLabel({\t\t\r\n\ttextAlign:'left',\r\n\twidth:'auto',\r\n\theight:'19dp',\r\n\tellipsize:true,\r\n\ttop:'45dp',\r\n\tcolor:'black',\r\n\ttext: 'sfashdfgaskdfhaslkdfjhaslkjdfhaslkjdfhlaskjhfdlk \\n sajhdflksajhflkdjhfalskjdfhalskjhdflksajhfdlkashjdlkfdjh',\r\n\tfont:{fontSize:'12dp',fontWeight:'normal',fontFamily:'Arial'}\r\n});\r\n", "attachment": [], "flagged": false, "summary": "Android: Label ellipsize not working when breaking line with \\n", "creator": { "name": "andreperazzi", "key": "andreperazzi", "displayName": "André Perazzi", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andreperazzi", "key": "andreperazzi", "displayName": "André Perazzi", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 3.1.0GA", "comment": { "comments": [ { "id": "254891", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Andre,\n\nI could not reproduce the issue you are seeing. I created my own test case which I pasted below. This is the proper way to use ellipsize. Would you mind trying it and letting me know if your problem persists? Also please provide the android version you are testing the code on.\n\n{code}\nvar parentView = Ti.UI.createWindow({\n\tbackgroundColor: 'gray'\n\t});\n\nvar label = Ti.UI.createLabel({\t\ntextAlign:'left',\nwidth:'100dp',\nheight:'15dp',\nellipsize: true,\ntop:'45dp',\ncolor:'black',\ntext: 'The quick brown fox jumped over the lazy dog. /n The quick brown fox jumped over the lazy dog again.',\nwordWrap: false,\nfont:{fontSize:'12dp',fontWeight:'normal',fontFamily:'Arial'}\n});\n\nparentView.add(label);\nparentView.open();\n{code}\n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-30T17:53:34.000+0000", "updated": "2013-05-30T17:53:34.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }