{ "id": "128645", "key": "AC-3172", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-04-04T05:36:36.000+0000", "created": "2014-04-03T20:50:54.000+0000", "labels": [], "versions": [], "issuelinks": [ { "id": "36411", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "99257", "key": "TIMOB-10451", "fields": { "summary": "Android: 'ellipsize' label property does not work on Android 4.x", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:57:34.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": [], "description": "The 'ellipsize' property for labels does not work on Android 4.x because maxLines cannot be set on the underlying TextView.\r\n\r\nFor example:\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n backgroundColor:'red',\r\n exitOnClose:true,\r\n title:'win1: Main Window'\r\n});\r\nvar label1 = Ti.UI.createLabel({\r\n backgroundColor:'black',\r\n color:'white',\r\n ellipsize:true,\r\n text:'This is some text to demonstrate the use of the ellipsize property of a label(click me!) This is some text to demonstrate the use of the ellipsize property of a label(click me!)',\r\n height:66,\r\n width:200,\r\n font:{fontSize:16}\r\n});\r\nwin1.add(label1);\r\nwin1.open();\r\n{code}\r\n\r\nThe above will be ellipsized on iOS and on Android 2.x, but not on Android 4.0 or higher.\r\n\r\nWe can make this work by a simple modification to the TiUILabel class to allow setting the 'maxLines' property of the TextView which is wrapped by TiUILabel.", "attachment": [], "flagged": false, "summary": "Android: Allow setting maxLines property of TextView through Ti.UI.Label", "creator": { "name": "cogent", "key": "cogent", "displayName": "Ali Gangji", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cogent", "key": "cogent", "displayName": "Ali Gangji", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android OS 4.x (tested on Nexus Galaxy and Samsung S3)\r\nTitanium SDK tested: 3.2.2", "comment": { "comments": [ { "id": "299828", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a really old Android platform bug that is still not fixed. We cannot work around it in the Titanium. Resolving it as a duplicate of TIMOB-10451.\r\n\r\nGoogle bug:\r\nhttp://code.google.com/p/android/issues/detail?id=882", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-03T23:22:17.000+0000", "updated": "2014-04-04T05:36:12.000+0000" }, { "id": "299847", "author": { "name": "cogent", "key": "cogent", "displayName": "Ali Gangji", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is not the same issue. The android bug you referenced is an issue with single-line text and the ellipsize property.\n\nThe way to ellipsize text after multiple lines on android is to use the maxLines property. This is a feature request to implement that property to enable setting a specific number of lines greater than 1. This is new functionality that titanium does not support.\n\nWhy would you not have interest in supporting this property?", "updateAuthor": { "name": "cogent", "key": "cogent", "displayName": "Ali Gangji", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-04T05:55:20.000+0000", "updated": "2014-04-04T05:55:20.000+0000" }, { "id": "302120", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As per engineering comment in TIMOB-10451 ticket, we cannot set maxLines as SDK would need to calculate maximum number of lines dynamically based on a number of variables including font, spacing, text size and \r\n\r\nTo set the maxLines, the number of lines needs to be calculated dynamically which really depends on the font, spacing, text etc. and that would be error prone at the SDK level.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-23T03:51:16.000+0000", "updated": "2014-04-23T03:51:16.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }