{ "id": "166574", "key": "TIMOB-24479", "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": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-15T22:42:30.000+0000", "created": "2017-03-13T12:06:51.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "label", "maxlines" ], "versions": [ { "id": "18928", "name": "Release 6.0.2", "archived": false, "released": true, "releaseDate": "2017-02-27" } ], "issuelinks": [], "assignee": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T08:57:15.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": "Label's property maxLines seems not to work since SDK 6 on Android.\r\nhttps://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Label-property-maxLines\r\n\r\nI've tested it on SDK 5.1.x and 5.5.x and it does work.\r\nOn 6.0.2.GA, or 6.1.0.v20170312111734 it DOES NOT work.\r\nThe funny thing is that it works correctly when the Label is inside a List Item template.\r\n\r\nhere is a test code:\r\n{code:borderStyle=solid}\r\nvar win = Ti.UI.createWindow({\r\n theme: \"Theme.AppCompat.Fullscreen\",\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar longString = \"Welcome to the Appcelerator Platform! The Appcelerator Platform extends Appcelerator's Titanium platform to help you manage the entire lifecycle of the application with debugging, testing, deployment, crash monitoring and analytic data collection.\";\r\nvar bigLabel = Ti.UI.createLabel({\r\n text:longString,\r\n color:'#4d4d4d',\r\n width:'90%',\r\n top:10,\r\n lines:1\r\n});\r\nwin.add(bigLabel);\r\nbigLabel.setMaxLines(1);\r\n\r\nvar myTemplate = {\r\n childTemplates: [\r\n {\r\n type: 'Ti.UI.Label',\r\n bindId: 'info',\r\n properties: {\r\n color:'#4d4d4d',\r\n left:0,\r\n maxLines:1\r\n }\r\n }\r\n ]\r\n};\r\n\r\nvar listView = Ti.UI.createListView({\r\n top:300,\r\n width:'90%',\r\n templates: { 'template': myTemplate },\r\n defaultItemTemplate: 'template'\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection();\r\nvar fruitDataSet = [\r\n {\r\n info: { text: longString }\r\n },\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\nlistView.setSections(sections);\r\nwin.add(listView);\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "61840", "filename": "maxLines.png", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-13T12:06:22.000+0000", "size": 75123, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: maxLines not working for Ti.UI.Label (regression)", "creator": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 6+\r\nMoto G 4th with Android 6.0.1", "closedSprints": [ { "id": 854, "state": "closed", "name": "2017 Sprint 06 SDK", "startDate": "2017-03-12T19:14:58.337Z", "endDate": "2017-03-26T19:14:00.000Z", "completeDate": "2017-03-26T22:01:15.828Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "411406", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I can verify the issue in Android 6.0.1 with SDK 6.0.2.GA. maxLines not working for labels.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-03-13T14:59:22.000+0000", "updated": "2017-03-13T14:59:22.000+0000" }, { "id": "411515", "author": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8884. 6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8885", "updateAuthor": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-13T20:25:03.000+0000", "updated": "2017-03-13T22:15:51.000+0000" }, { "id": "412034", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Nice! Thanks Frankie!\r\nHow should I proceed to use this fix in my code? Wait for a new release?", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T11:09:05.000+0000", "updated": "2017-03-14T11:09:05.000+0000" }, { "id": "412109", "author": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~chmiiller] The fix is openly available so, if you wish, you can pull and build it to see if it fixes your problem but it's currently in the review and testing phase by our developers and testers so I recommend waiting to hear what the final verdict is at least and I think a 6.0.3 release is coming soon if you decide to wait for the release. I hope that was informational.", "updateAuthor": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T17:52:06.000+0000", "updated": "2017-03-14T17:52:06.000+0000" }, { "id": "412737", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix is present in 6.0.3.v20170315154238. Test steps and information can be found at https://github.com/appcelerator/titanium_mobile/pull/8885 ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-15T22:53:56.000+0000", "updated": "2017-03-15T22:53:56.000+0000" }, { "id": "413494", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix also present it 6.1.0.v20170317060325. Test steps and information can be found at https://github.com/appcelerator/titanium_mobile/pull/8884 ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-17T16:22:51.000+0000", "updated": "2017-03-17T16:22:51.000+0000" }, { "id": "413652", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes it is @Frankie! Thank you so much. Gonna start using 6.0.3!\r\nThanks", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T08:57:15.000+0000", "updated": "2017-03-20T08:57:15.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }