{ "id": "166862", "key": "TIMOB-24545", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2017-03-29T17:29:20.000+0000", "created": "2017-03-29T17:28:33.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "ellipsize", "ipass1", "label" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "54650", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "116050", "key": "TIDOC-2819", "fields": { "summary": "Android: ellipsize not working with no width", "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": "Low", "id": "4" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T17:29:20.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": "On Android, ellipsize will work for single line labels, only if the width property is defined and wordWrap is set to false. However, if the width of the label is defined in terms of left and right properties, ellipsize does not work.\r\n\r\nEllipsize will work for the label below:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"#FFF\"\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n\tfont : {\r\n\t\tfontSize : '32dp'\r\n\t},\r\n\twidth : '250dp',\r\n\theight : '75dp',\r\n\tellipsize : true,\r\n\twordWrap : false,\r\n\thtml : \"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\"\r\n});\r\n\r\nwin.add(label);\r\nwin.open();\r\n{code}\r\n\r\nEllipsize will *not* work for the label below:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"#FFF\"\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n\tfont : {\r\n\t\tfontSize : '32dp'\r\n\t},\r\n\tleft : '10dp',\r\n\tright : '10dip',\r\n\theight : '75dp',\r\n\tellipsize : true,\r\n\twordWrap : false,\r\n\thtml : \"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\"\r\n});\r\n\r\nwin.add(label);\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: ellipsize not working with no width", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kouroche", "key": "kouroche", "displayName": "Kouroche Sedaghatian", "active": true, "timeZone": "America/New_York" }, "environment": "Android 4.x\r\nTi SDK: 3.x", "comment": { "comments": [ { "id": "416206", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created by mistake", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T17:29:20.000+0000", "updated": "2017-03-29T17:29:20.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }