{ "id": "175068", "key": "TIMOB-27927", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-07-28T20:43:09.000+0000", "created": "2020-06-02T20:40:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "picker" ], "versions": [], "issuelinks": [ { "id": "59201", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "176069", "key": "TIMOB-28366", "fields": { "summary": "Ti.UI.Picker Test Suite: Titanium.UI.Picker Acceptance TIMOB-27927 Android Only", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "10100", "description": "This Issue Type is used to create Zephyr Test within Jira.", "name": "Test", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-02-23T11:42:30.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": "Setting the color of a picker row dynamically does not show up the changed color. To show up the changed color we need to select another option and reselect the first one.\r\n\r\n*Steps to reproduce:*\r\n# Create a project using the app.js as below. Run on android device\r\n# Select an option in the picker. The selected option should change text color but it does not show up the color change.\r\n# Click on the picker again. The last selected option shows changed color in the drop down.\r\n# Select another option and again the option selected in step 2. The changed color is shown now.\r\nNote: On iOS calling the picker.reloadColumn() method reloads the picker and shows the changed color of the selected option.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({ backgroundColor: \"gray\" });\r\nvar picker = Ti.UI.createPicker({ width: \"50%\" });\r\npicker.add([\r\n\tTi.UI.createPickerRow({ title: \"Red\", color: \"red\" }),\r\n\tTi.UI.createPickerRow({ title: \"Green\", color: \"green\" }),\r\n\tTi.UI.createPickerRow({ title: \"Blue\", color: \"blue\" }),\r\n]);\r\npicker.addEventListener(\"change\", function(e) {\r\n\tTi.API.info(\"### Selected row: \" + e.rowIndex);\r\n\tpicker.getSelectedRow(0).color = \"purple\";\r\n});\r\nwindow.add(picker);\r\nwindow.open();\r\n{code}\r\n\r\n*Expected Result:*\r\nOn android the color change of the option should show on the first time it is selected.\r\n\r\n*Work-Around:*\r\nSet the row's title text after setting the color. This force picker's text field to update.\r\n\r\n{code:javascript}\r\npicker.addEventListener(\"change\", function(e) {\r\n\tTi.API.info(\"### Selected row: \" + e.rowIndex);\r\n\tvar row = picker.getSelectedRow(0);\r\n\trow.color = \"purple\";\r\n\trow.title = row.title; // <- This updates the picker's TextField.\r\n});\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Changing currently selected row's color in picker does not update shown color", "creator": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS: 10.15.4\r\nSDK: 9.0.2.GA\r\nAppc CLI: 8.0.0\r\nJDK: 11.0.4\r\nNode: 10.17.0\r\nStudio: 6.0.0.202005141803\r\nDevice: Pixel3(v10.0) emulator", "closedSprints": [ { "id": 1196, "state": "closed", "name": "2020 Sprint 11", "startDate": "2020-05-26T15:56:00.000Z", "endDate": "2020-06-05T15:56:00.000Z", "completeDate": "2020-06-08T21:05:50.356Z", "originBoardId": 114 }, { "id": 1198, "state": "closed", "name": "2020 Sprint 12", "startDate": "2020-06-08T21:06:41.849Z", "endDate": "2020-06-19T21:06:00.000Z", "completeDate": "2020-06-19T15:54:38.493Z", "originBoardId": 114 }, { "id": 1199, "state": "closed", "name": "2020 Sprint 13", "startDate": "2020-06-19T16:41:04.099Z", "endDate": "2020-07-02T16:41:00.000Z", "completeDate": "2020-07-02T15:37:12.455Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455618", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11747", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-03T01:48:37.000+0000", "updated": "2020-06-03T01:48:37.000+0000" }, { "id": "456025", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-08T21:24:17.000+0000", "updated": "2020-07-08T21:24:17.000+0000" }, { "id": "456258", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS: 10.15.4\r\nSDK: 9.1.0.v20200727104531\r\nAppc CLI: 8.1.0-master.7\r\nJDK: 11.0.4\r\nNode: 10.17.0\r\nStudio: 6.0.0.202005141803\r\nDevice: Nexus4(v5.1.1) device, Pixel3(v10.0) emulator", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-28T20:43:09.000+0000", "updated": "2020-07-28T20:43:09.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }