{ "id": "99257", "key": "TIMOB-10451", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-07-19T18:50:05.000+0000", "created": "2012-08-15T11:57:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "exalture" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" } ], "issuelinks": [ { "id": "36411", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "128645", "key": "AC-3172", "fields": { "summary": "Android: Allow setting maxLines property of TextView through Ti.UI.Label", "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" } }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:57:35.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": "h3. Problem description\r\nThe 'ellipsize' property for labels does not work on Android 4.x\r\nThe ellipsis (...) is not shown at all\r\n\r\nh3. Sample code to reproduce\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\n\r\nSee attached screenshots - one is relative to Android 2.2 and other one to Android 4.x", "attachment": [ { "id": "30512", "filename": "AndroidOS2.2.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-15T11:57:37.000+0000", "size": 14097, "mimeType": "image/png" }, { "id": "30511", "filename": "AndroidOS4.x.png", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-15T11:57:37.000+0000", "size": 29284, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: 'ellipsize' label property does not work on Android 4.x", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android OS 4.x (tested on Nexus Galaxy and Samsung S3)\r\nTitanium SDK tested: 2.1.1", "comment": { "comments": [ { "id": "231568", "author": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "This looks like an Android SDK issue. Either setSingleLine or setMaxLines needs to be set on the Android textView. \r\nsee http://code.google.com/p/android/issues/detail?id=882 ", "updateAuthor": { "name": "salachi", "key": "salachi", "displayName": "sunil alachi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-12-15T12:29:57.000+0000", "updated": "2012-12-15T12:29:57.000+0000" }, { "id": "239226", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "This is an Android SDK bug.\r\nHere is the link\r\nhttp://code.google.com/p/android/issues/detail?id=882 ", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-02-21T14:04:19.000+0000", "updated": "2013-02-21T14:04:19.000+0000" }, { "id": "239519", "author": { "name": "kenthao", "key": "kenthao", "displayName": "kent hao", "active": true, "timeZone": "America/Los_Angeles" }, "body": "are you sure it's the bug of android sdk 4.x? because then i look at the link, two things are weird:\r\n1. the problem is issued in 2008, 5 years passed .......\r\n2. in the link, there's some comment(#47) say it's working perfect in 4.x", "updateAuthor": { "name": "kenthao", "key": "kenthao", "displayName": "kent hao", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-23T03:06:12.000+0000", "updated": "2013-02-23T03:07:22.000+0000" }, { "id": "239522", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "This works in some special cases like if the line is set to singleLine or setMaxLines is set. In our case, we can't make the line as singleLine. To set the maxLines, the number of lines needs to be calculated dynamically which really depends on the font, spacing, text etc.\n", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-02-23T04:50:07.000+0000", "updated": "2013-02-23T04:50:07.000+0000" }, { "id": "239523", "author": { "name": "kenthao", "key": "kenthao", "displayName": "kent hao", "active": true, "timeZone": "America/Los_Angeles" }, "body": "thanks for your reply. you mentioned dynamically calculation, could you please give me some hint about how to do that? maybe it's not the proper place for Q&A, but it will be great if you give me some link.", "updateAuthor": { "name": "kenthao", "key": "kenthao", "displayName": "kent hao", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-23T06:35:37.000+0000", "updated": "2013-02-23T06:35:37.000+0000" }, { "id": "416179", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Not Our Bug\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T16:35:08.000+0000", "updated": "2017-03-29T16:35:08.000+0000" }, { "id": "422383", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening because this is a valid request. Especially since iOS and Windows Phone supports this.\r\n\r\nNote that the prior comments are correct. The Android OS does not support showing ellipsis when setting the Label view height. Android only supports ellipsis when setting the \"lines\" and \"maxLines\" properties. So, we would have to calculate the visible lines ourselves in Java.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-20T18:50:16.000+0000", "updated": "2017-06-20T18:50:16.000+0000" }, { "id": "423873", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9211", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-07-11T03:01:59.000+0000", "updated": "2017-07-11T03:01:59.000+0000" }, { "id": "440369", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed tickets from 2016 and earlier. If this ticket should not have been closed, please reopen it.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:57:35.000+0000", "updated": "2018-08-06T17:57:35.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }