{ "id": "142861", "key": "TIMOB-18499", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": null, "resolutiondate": null, "created": "2015-01-15T13:48:32.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TCSupport" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [ { "id": "46195", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "145086", "key": "TIMOB-18608", "fields": { "summary": "Android: Add \"link\" event to label for use with \"html\" and \"attributedString\" properties", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T19:54:54.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Is it possible that Ti.UI.ATTRIBUTE_LINK could respond to click events in addition to longpress? It is difficult to explain to users that they see something that looks clickable, but no, they need to longpress it. We end up having to use StyledLabel modules to get this working.", "attachment": [], "flagged": false, "summary": "TiAPI: Ti.UI.ATTRIBUTE_LINK needs to support click events", "creator": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 345, "state": "closed", "name": "2015 Sprint 04 SDK", "startDate": "2015-02-14T01:00:53.297Z", "endDate": "2015-03-01T01:00:00.000Z", "completeDate": "2015-02-28T15:39:43.652Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "343178", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "I didn't flag this as iOS or Android because it should be implemented for both, now that Android supports attributed strings TIMOB-15998", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2015-02-13T00:44:19.000+0000", "updated": "2015-02-13T00:47:36.000+0000" }, { "id": "343906", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test case\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#ddd',\r\n fullscreen:true,\r\n layout:'vertical'\r\n});\r\n \r\nvar text = 'Tap on any of the following:\\n1.Appcelerator Titanium \\t2.Android \\t3.IOS';\r\n \r\nvar attr = Ti.UI.createAttributedString({\r\n text: text,\r\n attributes: [\r\n {\r\n type: Ti.UI.ATTRIBUTE_LINK,\r\n value: 'http://www.appcelerator.com/developers/',\r\n range: [text.indexOf('Appcelerator Titanium'), ('Appcelerator Titanium').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_FONT,\r\n value: {textStyle:Ti.UI.TEXT_STYLE_HEADLINE},\r\n range: [text.indexOf('Appcelerator'), ('Appcelerator').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_FONT,\r\n value: {textStyle:Ti.UI.TEXT_STYLE_SUBHEADLINE},\r\n range: [text.indexOf('Titanium'), ('Titanium').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_LINK,\r\n value: 'http://developer.android.com/',\r\n range: [text.indexOf('Android'), ('Android').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_FONT,\r\n value: {textStyle:Ti.UI.TEXT_STYLE_CAPTION1},\r\n range: [text.indexOf('Android'), ('Android').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_LINK,\r\n value: 'https://developer.apple.com/',\r\n range: [text.indexOf('IOS'), ('IOS').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_FONT,\r\n value: {textStyle:Ti.UI.TEXT_STYLE_CAPTION1},\r\n range: [text.indexOf('IOS'), ('IOS').length]\r\n },\r\n ]\r\n});\r\n \r\nvar label = Ti.UI.createLabel({\r\n backgroundColor: '#ccc',\r\n attributedString: attr,\r\n});\r\n \r\nlabel.addEventListener('link',function(e){\r\n alert(e.url);\r\n})\r\n \r\n \r\n \r\n \r\nvar container1 = Ti.UI.createView({width:Ti.UI.SIZE,height:Ti.UI.SIZE,layout:'horizontal'});\r\nvar b11 = Ti.UI.createButton({title:' W 200 '});\r\nvar b12 = Ti.UI.createButton({title:' W 300 '});\r\nvar b13 = Ti.UI.createButton({title:' W SIZE '});\r\ncontainer1.add(b11);\r\ncontainer1.add(b12);\r\ncontainer1.add(b13);\r\n \r\nvar container2 = Ti.UI.createView({width:Ti.UI.SIZE,height:Ti.UI.SIZE,layout:'horizontal'});\r\nvar b21 = Ti.UI.createButton({title:' H 200 '});\r\nvar b22 = Ti.UI.createButton({title:' H 300 '});\r\nvar b23 = Ti.UI.createButton({title:' H SIZE '});\r\ncontainer2.add(b21);\r\ncontainer2.add(b22);\r\ncontainer2.add(b23);\r\n \r\nvar container3 = Ti.UI.createView({width:Ti.UI.SIZE,height:Ti.UI.SIZE,layout:'horizontal'});\r\nvar b31 = Ti.UI.createButton({title:' Vert C '});\r\nvar b32 = Ti.UI.createButton({title:' Vert T '});\r\nvar b33 = Ti.UI.createButton({title:' Vert B '});\r\ncontainer3.add(b31);\r\ncontainer3.add(b32);\r\ncontainer3.add(b33);\r\n \r\nvar container4 = Ti.UI.createView({width:Ti.UI.SIZE,height:Ti.UI.SIZE,layout:'horizontal'});\r\nvar b41 = Ti.UI.createButton({title:' Hor L '});\r\nvar b42 = Ti.UI.createButton({title:' Hor C '});\r\nvar b43 = Ti.UI.createButton({title:' Hor R '});\r\ncontainer4.add(b41);\r\ncontainer4.add(b42);\r\ncontainer4.add(b43);\r\n \r\n//vertical = {center:0,top:1,bottom:2}\r\n//horizontal = {left:0,center:1,right:2}\r\n \r\n \r\nfunction clickHandler(e){\r\n if (e.source == b11) {\r\n label.width = 200;\r\n } \r\n if (e.source == b12) {\r\n label.width = 300;\r\n } \r\n if (e.source == b13) {\r\n label.width = Ti.UI.SIZE;\r\n } \r\n if (e.source == b21) {\r\n label.height = 200;\r\n } \r\n if (e.source == b22) {\r\n label.height = 300;\r\n } \r\n if (e.source == b23) {\r\n label.height = Ti.UI.SIZE;\r\n } \r\n if (e.source == b31) {\r\n label.verticalAlign = 0;\r\n } \r\n if (e.source == b32) {\r\n label.verticalAlign = 1;\r\n } \r\n if (e.source == b33) {\r\n label.verticalAlign = 2;\r\n } \r\n if (e.source == b41) {\r\n label.textAlign = 0;\r\n } \r\n if (e.source == b42) {\r\n label.textAlign = 1;\r\n } \r\n if (e.source == b43) {\r\n label.textAlign = 2;\r\n } \r\n}\r\n \r\nwin.addEventListener('click',clickHandler);\r\n \r\n \r\nwin.add(label);\r\nwin.add(container1);\r\nwin.add(container2);\r\nwin.add(container3);\r\nwin.add(container4);\r\n \r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-19T16:22:46.000+0000", "updated": "2015-02-19T17:26:15.000+0000" }, { "id": "343908", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Changing to TiAPI as requested by Shannon.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-19T16:47:39.000+0000", "updated": "2015-02-19T16:47:39.000+0000" }, { "id": "343909", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "looks like the test case needs tweaking... createAttributedString has been moved to `Titanium.UI.createAttributedString` in 4.0.0\r\n\r\n[https://github.com/appcelerator/titanium_mobile/blob/124852b1b7def38a37e565cacff067bca3dcdd65/apidoc/Titanium/UI/iOS/Attribute.yml#L5] via TIMOB-15998", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2015-02-19T16:49:53.000+0000", "updated": "2015-02-19T16:49:53.000+0000" }, { "id": "343914", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6653", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-19T17:27:12.000+0000", "updated": "2015-02-19T17:27:12.000+0000" }, { "id": "343999", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "@vduggal The PR only addresses iOS. That doesn't Resloved/Fixed this ticket. It only creates another iOS/Android parity issue.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2015-02-20T02:16:26.000+0000", "updated": "2015-02-20T02:16:41.000+0000" }, { "id": "344041", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@[~iotashan]\r\nThe Android work is done in a separate task as a new feature.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-20T18:30:31.000+0000", "updated": "2015-02-20T18:30:31.000+0000" }, { "id": "344043", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "Do you have the JIRA ticket for that handy? I couldn't find one that specifically calls this out or shows a test case for it.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2015-02-20T18:39:15.000+0000", "updated": "2015-02-20T18:39:15.000+0000" }, { "id": "344238", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@[~iotashan]\r\nSee TIMOB-18608", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-24T20:11:37.000+0000", "updated": "2015-02-24T20:11:37.000+0000" }, { "id": "345751", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed using:\r\n\r\nTitanium SDK 4.0.0.v20150311105810\r\nStudio 4.0.0.201503062102\r\nCLI 3.4.2\r\nXcode 6.2\r\nNode 0.10.36\r\n\r\nOn:\r\nGalaxy Note 2, Android 4.3\r\niPhone 6, iOS 8.2\r\n\r\nClick and Longpress events correctly fired.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-11T23:16:09.000+0000", "updated": "2015-03-11T23:16:09.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }