{ "id": "167155", "key": "TIMOB-24592", "fields": { "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": [], "resolution": null, "resolutiondate": null, "created": "2017-04-18T04:35:51.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:54:54.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": "As you know that by default Titanium Android buttons have their backgroundColor from xml themes keeping the Ripple effect + Shadow intact.\r\n\r\nBut as soon as we set backgroundColor property of Ti.UI.Button in Android-Titanium, the Ripple effect is gone.\r\n\r\nI really found out the same behaviour in native Android itself & here's the solution.\r\n\r\nIn native Android - we can use backgroundTint property to set any other backgroundColor than specified in theme file. It will keep the ripple effect + shadow same & will provide easiest option to change the backgroundColor of Ti.UI.Button.\r\n\r\nHence, we should also have a similar property in Titanium.\r\n\r\nIn attached screenshots, you can see the code & its UI result. Though I cannot capture ripple effect but it's there when you tap button.", "attachment": [ { "id": "62043", "filename": "Screen Shot 2017-04-17 at 4.06.45 PM.png", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-18T04:35:11.000+0000", "size": 19990, "mimeType": "image/png" }, { "id": "62042", "filename": "Screen Shot 2017-04-17 at 4.06.49 PM.png", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-18T04:35:12.000+0000", "size": 71561, "mimeType": "image/png" } ], "flagged": false, "summary": "Add backgroundTint in Android Titanium to change the background colors of Ti.UI.Button keeping ripple effect+shadow same.", "creator": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "417590", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Thanks for submitting the ticket. Please provide Native docs link here. Our engineers will consider it. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-04-18T16:20:36.000+0000", "updated": "2017-04-18T16:20:36.000+0000" }, { "id": "417591", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's the link:\r\n\r\nhttps://developer.android.com/reference/android/view/View.html#attr_android:backgroundTint\r\n\r\nNative Android Button inherits XML attributes from View as described in above link.\r\n", "updateAuthor": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-18T16:25:18.000+0000", "updated": "2017-04-18T16:25:18.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }