{ "id": "168572", "key": "TIMOB-24881", "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": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-05-21T21:58:13.000+0000", "created": "2017-06-23T00:05:58.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "label" ], "versions": [ { "id": "19572", "description": "Important fixes for 6.1.0", "name": "Release 6.1.1", "archived": false, "released": true, "releaseDate": "2017-06-16" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-05-21T21:58:13.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": "*Summary:*\r\nWhen a Label is set up to \"autoLink\" its text which contains at least 1 URL, then ellipsize modes START and MIDDLE are not honored. The label will use ellipsize mode END instead.\r\n\r\n*Code Example:*\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nwindow.add(Ti.UI.createLabel(\r\n{\r\n\ttext: \"https://www.appcelerator.com\",\r\n\tfont: { fontSize: \"50dp\" },\r\n\tautoLink: Ti.UI.AUTOLINK_URLS,\r\n//\tellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_START,\r\n\tellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MIDDLE,\r\n\twidth: \"100%\",\r\n}));\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nEllipsis are shown at the end instead of the start or middle.\r\n\r\n*Reason:*\r\nAndroid's Java \"TextView does not support displaying START or MIDDLE ellipsis while a \"MovementMethod\" (such as \"LinkMovementMethod\" in this case) is applied to it. Our existing \"TiUILabel.java\" code works-around this problem and applies an END ellipsis in this case instead.\r\n\r\n*Suggested Solution:*\r\nAndroid 5.0 and above supports URL taps without a MovementMethod, but Android 4.0 does not (I'm not sure which OS versions in the middle do support it). This is because Google's \"TextView.java\" code in its onTouchEvent() method handles URL taps for newer OS versions (see their code on github). So, the recommended solution here is to not set a MovementMethod in \"TiUILabel.java\" and for us to replicate what Google does in their TextView.onTouchEvent() in our TiUILabel code so that we can support URL taps on all Android OS versions.", "attachment": [], "flagged": false, "summary": "Android: Label ellipsize modes START and MIDDLE don't work if \"autoLink\" is true", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1136, "state": "closed", "name": "2019 Sprint 11", "startDate": "2019-05-18T17:39:52.830Z", "endDate": "2019-05-31T17:39:00.000Z", "completeDate": "2019-06-04T21:37:11.485Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "448380", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10887", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-15T00:07:39.000+0000", "updated": "2019-05-15T00:07:39.000+0000" }, { "id": "448576", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 8.1.0.v20190521052940.Label ellipsize works as expected.\r\n\r\n*Test Environment:*\r\n{CODE}\r\nName = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 17179869184\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.1.0.v20190521052940\r\nDevice =Samsung s5 android 6\r\nEmulator = Pixel android 9,galaxy nexus android 4.4\r\n{CODE}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-05-21T21:58:08.000+0000", "updated": "2019-05-21T21:58:08.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }