{ "id": "140075", "key": "TIMOB-18062", "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": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-03-10T23:29:10.000+0000", "created": "2014-11-20T06:59:37.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "label", "parity", "qe-4.0.0", "qe-manualtest", "textarea", "textfield" ], "versions": [], "issuelinks": [ { "id": "44666", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "126587", "key": "ALOY-961", "fields": { "summary": "Alloy: Add attributedString/attributedHintText support", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "43323", "type": { "id": "10120", "name": "Gantt: finish-start", "inward": "has to be done after", "outward": "has to be done before" }, "inwardIssue": { "id": "123770", "key": "TIMOB-15998", "fields": { "summary": "Android: Support AttributedString", "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 } } } }, { "id": "44434", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "126587", "key": "ALOY-961", "fields": { "summary": "Alloy: Add attributedString/attributedHintText support", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "44737", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "142855", "key": "TIDOC-2086", "fields": { "summary": "Update attributedStrings docs to Android/iOS parity", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "44025", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "141445", "key": "TIMOB-18184", "fields": { "summary": "Android: Implement attributedString on TextArea and TextField", "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": "Low", "id": "4" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2015-03-25T23:12:56.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Android can now support AttributedString as well. To update iOS attributedString feature so as to achieve parity.\r\nDeprecate Titanium.UI.iOS.AttributedString, and use Titanium.UI.AttributedString instead.\r\n\r\nUse following sample code (works for BOTH android and iOS): \r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor: '#ddd',\r\n});\r\n \r\nwin.open();\r\n \r\nvar text = 'Bacon ipsum dolor Appcelerator Titanium rocks! sit amet fatback leberkas salami sausage tongue strip steak.';\r\n \r\nvar attr = Ti.UI.createAttributedString({\r\n text: text,\r\n attributes: [\r\n //font\r\n {\r\n type: Ti.UI.ATTRIBUTE_FONT,\r\n value: {font:{fontSize:50,fontFamily:'Helvetica Neue'}},\r\n range: [0, text.length]\r\n },\r\n // Underlines text\r\n {\r\n type: Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,\r\n value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE, //only iOS needs this, android ignores.\r\n range: [0, text.length]\r\n },\r\n // Sets a background color\r\n {\r\n type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,\r\n value: \"red\",\r\n range: [text.indexOf('Appcelerator'), ('Appcelerator').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,\r\n value: \"blue\",\r\n range: [text.indexOf('Titanium'), ('Titanium').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,\r\n value: \"yellow\",\r\n range: [text.indexOf('rocks!'), ('rocks!').length]\r\n },\r\n // Sets a foreground color\r\n {\r\n type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,\r\n value: \"orange\",\r\n range: [0, text.length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,\r\n value: \"black\",\r\n range: [text.indexOf('rocks!'), ('rocks!').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_LINK,//ignored in iOS, label doesn't support attribute link. Use textArea instead. \r\n value: \"http://www.appcelerator.com\",\r\n range: [text.indexOf('Appcelerator'), ('Appcelerator').length]\r\n }\r\n ]\r\n});\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\n \r\nvar changeStyle = Titanium.UI.createButton({\r\n bottom:200,\r\n title: \"ChangeStyle\"\r\n});\r\n \r\nwin.add(label);\r\nwin.add(changeStyle);\r\n \r\nvar attr2 = Titanium.UI.createAttributedString({\r\n text: text,\r\n attributes: [\r\n //font\r\n {\r\n type: Ti.UI.ATTRIBUTE_FONT,\r\n value: {font:{fontSize:30,fontFamily:'Helvetica Neue'}},\r\n range: [0, text.length]\r\n },\r\n // Underlines text\r\n {\r\n type: Ti.UI.ATTRIBUTE_UNDERLINES_STYLE,\r\n value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE, //only iOS needs this, android ignores.\r\n range: [0, text.length]\r\n },\r\n // Sets a background color\r\n {\r\n type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,\r\n value: \"green\",\r\n range: [text.indexOf('Appcelerator'), ('Appcelerator').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,\r\n value: \"red\",\r\n range: [text.indexOf('Titanium'), ('Titanium').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_BACKGROUND_COLOR,\r\n value: \"blue\",\r\n range: [text.indexOf('rocks!'), ('rocks!').length]\r\n },\r\n // Sets a foreground color\r\n {\r\n type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,\r\n value: \"black\",\r\n range: [0, text.length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,\r\n value: \"red\",\r\n range: [text.indexOf('rocks!'), ('rocks!').length]\r\n },\r\n // Sets strike through\r\n {\r\n type: Ti.UI.ATTRIBUTE_STRIKETHROUGH_STYLE,\r\n value: Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE, //only iOS needs this, android ignores.\r\n range: [text.indexOf('tongue'), ('tongue').length]\r\n },\r\n {\r\n type: Ti.UI.ATTRIBUTE_LINK, //ignored in iOS, label doesn't support attribute link. Use textArea instead. \r\n value: \"http://www.appcelerator.com\",\r\n range: [text.indexOf('Appcelerator'), ('Appcelerator').length]\r\n }\r\n ]\r\n});\r\n \r\nchangeStyle.addEventListener('click', function(){\r\n label.attributedString=attr2});\r\n{code}", "attachment": [ { "id": "52888", "filename": "androidAttFont1.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-01T09:42:18.000+0000", "size": 55983, "mimeType": "image/png" }, { "id": "52889", "filename": "androidAttFont2.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-01T09:42:18.000+0000", "size": 42726, "mimeType": "image/png" }, { "id": "52890", "filename": "iPhoneAttFont1.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-01T09:42:18.000+0000", "size": 89366, "mimeType": "image/png" }, { "id": "52891", "filename": "iPhoneAttFont2.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-01T09:42:18.000+0000", "size": 66977, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: AttributedString Parity with Android", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 291, "state": "closed", "name": "2015 Sprint 01 SDK", "startDate": "2015-01-03T01:00:00.000Z", "endDate": "2015-01-17T01:00:00.000Z", "completeDate": "2015-01-19T17:24:40.828Z", "originBoardId": 114 }, { "id": 356, "state": "closed", "name": "2015 Sprint 05 SDK", "startDate": "2015-02-28T15:50:08.527Z", "endDate": "2015-03-14T00:00:00.000Z", "completeDate": "2015-03-14T13:54:50.695Z", "originBoardId": 114 }, { "id": 272, "state": "closed", "name": "2014 Sprint 25 SDK", "startDate": "2014-12-08T22:49:31.264Z", "endDate": "2014-12-22T01:00:00.000Z", "completeDate": "2015-01-05T18:18:28.523Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "333105", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A reminder that we need to deprecate the iOS-specific namespace, not remove it (yet).", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-20T18:21:01.000+0000", "updated": "2014-11-20T18:21:01.000+0000" }, { "id": "334052", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here: https://github.com/appcelerator/titanium_mobile/pull/6409\r\n\r\niOS deprecation of Titanium.UI.IOS.AttributedString in favor of Titanium.UI.AttributedString. Pull request include Android support for AttributedString from pull request https://github.com/appcelerator/titanium_mobile/pull/6358, which will be closed once this PR is reviewed and merged.\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-11-28T07:52:52.000+0000", "updated": "2014-11-28T07:52:52.000+0000" }, { "id": "334106", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Comparable screen shots of outcome of code on both iOS and android.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-12-01T09:42:18.000+0000", "updated": "2014-12-01T09:42:18.000+0000" }, { "id": "335958", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Updated PR: https://github.com/appcelerator/titanium_mobile/pull/6463\r\nContains changes for Android.\r\n\r\nContinued from: https://github.com/appcelerator/titanium_mobile/pull/6409", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2014-12-11T04:33:56.000+0000", "updated": "2014-12-11T04:35:09.000+0000" }, { "id": "339196", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-15T07:02:30.000+0000", "updated": "2015-01-15T07:02:30.000+0000" }, { "id": "339272", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/6463 merged", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-15T18:36:40.000+0000", "updated": "2015-01-15T18:36:40.000+0000" }, { "id": "342378", "author": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Verified with below Test Environment:\r\n1. Mac OSX Yosemite 10.10\r\n2. Appcelerator Studio, build: 4.0.0.201502031850\r\n3. Titanium SDK, build: 4.0.0.v20150205163226\r\n4. Titanium CLI, build: 3.4.1\r\n5. Alloy: 1.5.1\r\n6. Xcode 6.1\r\n7. iOS SDK 8.1\r\n8. S Galaxy S5 with Android 4.4.2\r\n9. iPhone 6+, iOS 8.1\r\n\r\nWith Android, the attribute link didn't work for TextArea.\r\nI have tested it by setting autolink true and editable false. The same code works well with iOS for textarea. So reopening this ticket.\r\n", "updateAuthor": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2015-02-06T06:37:53.000+0000", "updated": "2015-02-06T06:37:53.000+0000" }, { "id": "343032", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/6641", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-02-12T06:38:48.000+0000", "updated": "2015-02-12T06:38:48.000+0000" }, { "id": "347359", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the improvement IOS now has parity with android regarding attributed string.\r\n\r\nEnvironment:\r\nAppc Studio : 4.0.0.201503232213\r\nTi SDK : 4.0.0.v20150323131014\r\nCLI : 4.0.0-alpha\r\nAlloy : 1.6.0-alpha\r\nMAC Yosemite : 10.10.2\r\nIphone 6 - IOS 8.1\r\nNexus 5 - android 5.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-25T23:12:48.000+0000", "updated": "2015-03-25T23:12:48.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }