{ "id": "135308", "key": "TIMOB-18502", "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": null, "resolutiondate": null, "created": "2014-08-26T12:34:29.000+0000", "priority": null, "labels": [ "AttributedString", "TCSupportTriage", "defect", "iOS7" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:00.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "h4. Problem Description\r\nYou can't mix the use of ATTRIBUTE_LINK and ATTRIBUTE_FOREGROUND_COLOR. Each one works fine by itself. \r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project classic titanium\r\n2. Add this code to app.js:\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor: '#ddd',\r\n});\r\nwin.open();\r\nvar text = 'My Site Is !Google!';\r\nvar attr = Titanium.UI.iOS.createAttributedString({\r\n text: text\r\n });\r\n attr.addAttribute({\r\n type: Titanium.UI.iOS.ATTRIBUTE_LINK,\r\n \tvalue: 'https://www.google.com.bd',\r\n \trange: [text.indexOf('!Google!'), ('!Google!').length]\r\n }); \r\n attr.addAttribute({\r\n type: Titanium.UI.iOS.ATTRIBUTE_FOREGROUND_COLOR,\r\n \tvalue: \"green\",\r\n \trange: [text.indexOf('!Google!'), ('!Google!').length]\r\n });\r\nvar label = Titanium.UI.createLabel({\r\n left: 20,\r\n right: 20,\r\n height: Titanium.UI.SIZE,\r\n attributedString: attr\r\n});\r\nwin.add(label);\r\n{code}\r\n3. Run in a device\r\n\r\nh4. Actual results\r\nAs you can see, if you mix ATTRIBUTE_FOREGROUND_COLOR and ATTRIBUTE_LINK, the only working will be ATTRIBUTE_LINK.\r\n\r\nh4. Expected results\r\nbeing able to mix ATTRIBUTE_LINK and ATTRIBUTE_FOREGROUND_COLOR. Currently, if you do a mix of ATTRIBUTE_BACKGROUND_COLOR and ATTRIBUTE_LINK, it will work just fine. ", "attachment": [], "flagged": false, "summary": "iOS AttributedString with ATTRIBUTE_LINK and ATTRIBUTE_FOREGROUND_COLOR together", "creator": { "name": "virendrapatidar", "key": "virendrapatidar", "displayName": "virendra patidar", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "virendrapatidar", "key": "virendrapatidar", "displayName": "virendra patidar", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 7.1, Ti SDK 3.3.0.GA\r\n", "comment": { "comments": [], "maxResults": 1, "total": 1, "startAt": 0 } } }