{ "id": "151486", "key": "TIMOB-19578", "fields": { "issuetype": { "id": "8", "description": "A technical task.", "name": "Technical task", "subtask": true }, "parent": { "id": "150516", "key": "TIMOB-19374", "fields": { "summary": "Android: Material Design Custom Animations", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-29T08:40:07.000+0000", "created": "2015-09-25T03:08:57.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "material-design", "touchfeedback" ], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T19:38:15.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": "Touch feedback in material design provides an instantaneous visual confirmation at the point of contact when users interact with UI elements. The default touch feedback animations for buttons use the new RippleDrawable class, which transitions between different states with a ripple effect.\r\n\r\nIn most cases, you should apply this functionality in your view XML by specifying the view background as:\r\n\r\n?android:attr/selectableItemBackground for a bounded ripple.\r\n?android:attr/selectableItemBackgroundBorderless for a ripple that extends beyond the view. It will be drawn upon, and bounded by, the nearest parent of the view with a non-null background.\r\nNote: selectableItemBackgroundBorderless is a new attribute introduced in API level 21.\r\n\r\nAlternatively, you can define a RippleDrawable as an XML resource using the ripple element.\r\n\r\nYou can assign a color to RippleDrawable objects. To change the default touch feedback color, use the theme's android:colorControlHighlight attribute.\r\n\r\nFor more information, see the API reference for the RippleDrawable class.", "attachment": [], "flagged": false, "summary": "Android: Customize Touch Feedback", "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, "comment": { "comments": [ { "id": "367112", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/7317\r\n\r\nTested with Kitchen sink suite and below test code\r\n{code:javascript}\r\nvar theWin = Ti.UI.createWindow({\r\n\tlayout:'vertical', \r\n\tbackgroundColor:'#0093b4',\r\n\ttouchFeedback: true\r\n});\r\n \r\nvar aButton = Ti.UI.createButton({\r\n\ttitle : 'Button with default touch feedback',\r\n\tbackgroundColor: 'red',\r\n\ttouchFeedback: true\r\n});\r\n \r\nvar changeRippleColorButton = Ti.UI.createButton({\r\n\ttitle : 'Change above ripple color to green',\r\n});\r\n \r\nchangeRippleColorButton.addEventListener('click', function() {\r\n\taButton.touchFeedbackColor = 'green';\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttext: 'View with touch feedback',\r\n\ttouchFeedback: true\r\n});\r\n \r\ntheWin.add(aButton);\r\ntheWin.add(changeRippleColorButton);\r\ntheWin.add(label);\r\n\r\ntheWin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-10-19T04:56:29.000+0000", "updated": "2016-08-01T12:38:05.000+0000" }, { "id": "367518", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~hpham] Updated with code review changes. Please review https://github.com/appcelerator/titanium_mobile/pull/7317/", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-10-22T05:53:45.000+0000", "updated": "2015-10-22T05:53:45.000+0000" }, { "id": "369166", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~hpham] Please review the PR. ", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-06T07:02:32.000+0000", "updated": "2015-11-06T07:02:32.000+0000" }, { "id": "371095", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~hpham] Please review resolved merge conflicts PR https://github.com/appcelerator/titanium_mobile/pull/7317/", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-23T04:58:05.000+0000", "updated": "2015-11-23T04:58:05.000+0000" }, { "id": "372304", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "Will this change enable developers to display touch feedback on ListItems? Or is there a related ticket to enable that functionality. Because the PR is related to the Ti.UI.View component, I suspect not. I'd really like to show touch feedback on a ListView because processing an {{itemclick}}, say to open a new window, can take a significant amount of time making for bad user experience.", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2015-12-07T14:07:25.000+0000", "updated": "2015-12-07T14:07:25.000+0000" }, { "id": "390262", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "The PRs need to be re-reviewed and also possibly rebased.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-07-11T05:34:14.000+0000", "updated": "2016-07-11T05:34:14.000+0000" }, { "id": "392059", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Updated PR (based on master): https://github.com/appcelerator/titanium_mobile/pull/8176\r\n\r\nWe can use the above demo-code to review. I also changed the {{since}} version to 6.1.0, added some docs-improvements and refactored some code-style. [~msamah] Can you proceed with the review then? After 6.0.0 branching I guess.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-31T10:46:01.000+0000", "updated": "2016-07-31T10:46:01.000+0000" }, { "id": "395336", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Some FT problems (tested on Sim so far):\r\n- When clicking the red button before changing the riffle color to green, I don't see a touch-feedback although {{touchFeedback}} is {{true}} already\r\n- I see touch-feedback on the default button to change the riffle color, so it might be a problem with (initial) custom colors that are not targeted correctly\r\n- I don't see any touch-feedback on both the view and the window, although {{touchFeedback}} is {{true}} there as well. Is it supposed to work there?\r\n\r\nI am not sure if that's intended behavior. I took over this PR from Srikanth, but maybe someone from the Android-team could rather help here. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-05T14:59:38.000+0000", "updated": "2016-09-23T23:42:16.000+0000" }, { "id": "397570", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] I reviewed and addressed the issues.\r\n\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/8446", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-28T21:39:48.000+0000", "updated": "2016-09-28T21:39:48.000+0000" }, { "id": "397612", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Test-case:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical',\r\n backgroundColor: '#A0E040',\r\n touchFeedback: false,\r\n touchFeedbackColor: '#FF0000'\r\n }),\r\n a = Ti.UI.createSwitch({\r\n style: Titanium.UI.Android.SWITCH_STYLE_CHECKBOX,\r\n title: 'ENABLE TOUCH FEEDBACK'\r\n }),\r\n b = Ti.UI.createButton({\r\n title : 'BUTTON',\r\n backgroundColor: '#40FFE0',\r\n touchFeedback: false,\r\n touchFeedbackColor: '#EE00FF'\r\n });\r\n\r\na.addEventListener('change', function(e) {\r\n win.setTouchFeedback(a.value);\r\n b.setTouchFeedback(a.value);\r\n});\r\n\r\nwin.add(a);\r\nwin.add(b);\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-29T08:40:01.000+0000", "updated": "2016-09-29T08:40:01.000+0000" }, { "id": "402219", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified, when the touch feedback was enabled the ripple effect was visible on the button; tested using the test case provided by [~hansknoechel]\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n layout: 'vertical',\r\n backgroundColor: '#A0E040',\r\n touchFeedback: false,\r\n touchFeedbackColor: '#FF0000'\r\n }),\r\n a = Ti.UI.createSwitch({\r\n style: Titanium.UI.Android.SWITCH_STYLE_CHECKBOX,\r\n title: 'ENABLE TOUCH FEEDBACK'\r\n }),\r\n b = Ti.UI.createButton({\r\n title : 'BUTTON',\r\n backgroundColor: '#40FFE0',\r\n touchFeedback: false,\r\n touchFeedbackColor: '#EE00FF'\r\n });\r\n\r\na.addEventListener('change', function(e) {\r\n win.setTouchFeedback(a.value);\r\n b.setTouchFeedback(a.value);\r\n});\r\n\r\nwin.add(a);\r\nwin.add(b);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\n*Environement*\r\n{code:java}\r\nAppcelerator Command-Line Interface, version 6.0.0\r\nAndroid 7.0 (Google Nexus 6P)\r\nOperating System Name: Mac OS X El Capitan\r\nOperating System Version: 10.11.6\r\nNode.js Version: 4.6.0\r\nnpm: 4.2.8\r\nTitanium CLI Version: 5.0.10\r\nTitanium SDK Version: 6.1.0.v20161129071600\r\nXcode: 8.0\r\nAppcelerator Studio: 4.8.0.201611121409\r\n{code}\r\n\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-29T21:19:48.000+0000", "updated": "2016-11-29T21:19:48.000+0000" }, { "id": "423032", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is really awesome! Does anyone have an input on how to apply this for ListViews?\r\nThanks!", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-28T10:37:10.000+0000", "updated": "2017-06-28T10:37:10.000+0000" }, { "id": "429292", "author": { "name": "clement", "key": "clement", "displayName": "Clément Blanco", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1 for the {{ListView}}. Documentation says it supports it but it clearly doesn't work with {{ItemTemplates}}.", "updateAuthor": { "name": "clement", "key": "clement", "displayName": "Clément Blanco", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-19T15:00:59.000+0000", "updated": "2017-10-19T15:00:59.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }