{ "id": "114512", "key": "TIMOB-13895", "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": [ { "id": "19572", "description": "Important fixes for 6.1.0", "name": "Release 6.1.1", "archived": false, "released": true, "releaseDate": "2017-06-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-06-23T01:31:09.000+0000", "created": "2013-05-17T07:56:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "look1", "regression" ], "versions": [ { "id": "17993", "description": "Release 5.2.2", "name": "Release 5.2.2", "archived": false, "released": true, "releaseDate": "2016-04-05" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-23T22:10:31.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": "h4. Problem Description\r\nWhen you create a label with a big text and the ellipsize set to true, the ellipsis won't be shown. \r\n\r\nh4. Test Case\r\n1. Create a classic project \r\n2. Paste this code as app.js:\r\n{code:Javascript title=app.js} \r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white',\r\n\texitOnClose : true,\r\n\tfullscreen : false,\r\n\tlayout : 'vertical',\r\n\ttitle : 'Label Demo'\r\n});\r\nvar label2 = Ti.UI.createLabel({\r\n\tcolor : 'blue',\r\n\ttext : 'A long label with a few line breaks and unicode (UTF8) symbols such as a white chess piece \\u2655 and the euro symbol \\u20ac looks like this! ',\r\n\ttextAlign : Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n\t//top : 30,\r\n\twidth : 200,\r\n\theight : 100,\r\n\tbackgroundColor:'red',\r\n\tlines: 1,\r\n\t//layout:'horizontal',\r\n\t//horizontalWrap: true,\r\n\t//wordWrap: true,\r\n\tellipsize: true\r\n\t\r\n});\r\nwin.add(label2);\r\nwin.open(); \r\n{code} \r\n3. Run it in a device.\r\n\r\nExpected: Truncated text in the label without ellipsis\r\nActual: You will see the truncated text in the label without ellipsis. \r\n\r\n", "attachment": [ { "id": "38649", "filename": "Captura de pantalla 2013-05-17 a la(s) 09.27.01.png", "author": { "name": "jpgsalcedo", "key": "jpgsalcedo", "displayName": "Juan Perales", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T07:56:54.000+0000", "size": 17176, "mimeType": "image/png" }, { "id": "38650", "filename": "Captura de pantalla 2013-05-17 a la(s) 09.28.55.png", "author": { "name": "jpgsalcedo", "key": "jpgsalcedo", "displayName": "Juan Perales", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T07:56:54.000+0000", "size": 17320, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Text wrapping in a label is not showing ellipsis (regression)", "creator": { "name": "jpgsalcedo", "key": "jpgsalcedo", "displayName": "Juan Perales", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jpgsalcedo", "key": "jpgsalcedo", "displayName": "Juan Perales", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Appcelerator Studio, build: 4.5.0.201602170821\r\nSDK: 5.2.2.GA\r\nNexus 7: android 6\r\nEmulator: Galaxy Nexus 4.2.2(API 17)\r\nOSX EI Capitan\r\nNode.js\r\n Node.js Version = 0.12.7\r\n npm Version = 2.11.3\r\nJava Development Kit\r\n Version = 1.7.0_80", "closedSprints": [ { "id": 649, "state": "closed", "name": "2016 Sprint 13 SDK", "startDate": "2016-06-18T00:25:17.303Z", "endDate": "2016-07-02T00:25:00.000Z", "completeDate": "2016-07-04T04:25:16.889Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "387810", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~jnaher] Please use this as a workaround for now:-\r\n{code}\r\nvar label2 = Ti.UI.createLabel({\r\n\tcolor : 'blue',\r\n\ttext : 'A long label with a few line breaks and unicode (UTF8) symbols such as a white chess piece \\u2655 and the euro symbol \\u20ac looks like this! ',\r\n\ttextAlign : Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n\t//top : 30,\r\n\twidth : 200,\r\n\theight : 100,\r\n\tbackgroundColor:'red',\r\n\tlines: 1,\r\n\t//layout:'horizontal',\r\n\t//horizontalWrap: true,\r\n\twordWrap: false,\r\n\tellipsize: true\r\n\t\r\n});\r\n{code}\r\nWhen the property {{wordWrap}} is set to {{false}} and {{ellipsize}} is set to true, it will behave as expected.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-08T04:40:29.000+0000", "updated": "2016-06-08T04:41:22.000+0000" }, { "id": "388912", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "There seems to be a related Android ticket for this: https://code.google.com/p/android/issues/detail?id=882\r\nThus, as mentioned in the solution earlier, setting {{wordWrap: false}} would solve the issue. Source code for that is here: https://github.com/appcelerator/titanium_mobile/blob/23c9e3fb93694950d33a8b4b79fbb2129ff9001b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUILabel.java#L246-L247\r\n\r\nResolving issue as there is already a workaround available and it's seems to be an Android issue.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-23T05:17:35.000+0000", "updated": "2016-06-23T05:17:58.000+0000" }, { "id": "398591", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "Hi guys,\r\nany news on this? I'm facing a problem with truncating, suggested idea partially works - it truncates the end, but also centers label in the middle(I have height and width set for label), so I see first sentence of a article. Have you any idea how to fix it?\r\nThank you", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2016-10-11T15:09:17.000+0000", "updated": "2016-10-11T15:09:17.000+0000" }, { "id": "422335", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (6.1.x): https://github.com/appcelerator/titanium_mobile/pull/9161", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-19T22:57:21.000+0000", "updated": "2017-06-19T22:57:21.000+0000" }, { "id": "422601", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for 6.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-23T01:31:09.000+0000", "updated": "2017-06-23T01:31:09.000+0000" }, { "id": "422627", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9175", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-23T16:16:57.000+0000", "updated": "2017-06-23T16:16:57.000+0000" }, { "id": "422679", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed for master.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-23T20:59:57.000+0000", "updated": "2017-06-23T20:59:57.000+0000" }, { "id": "422690", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nTest info in the PR.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.9.0.201705302345\r\nSDK Ver: 6.2.0.v20170623140932, 6.1.1.v20170623141152\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.9\r\nAppc CLI: 6.2.2\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.9.11\r\nNode Ver: 6.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Pixel --- Android 7.1.1\r\n ⇨ google Nexus 5 --- Android 6.0.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-23T22:10:19.000+0000", "updated": "2017-06-23T22:10:19.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }