{ "id": "172007", "key": "TIMOB-26263", "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": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-03-05T15:57:44.000+0000", "created": "2018-08-04T03:07:27.000+0000", "epic": { "id": 175923, "key": "TIMOB-28298", "name": "Android: Material widget support", "summary": "Android: Material widget support", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "button", "material-design" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-03-05T15:57:44.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": "*Summary:*\r\nOur Ti.UI.Button is currently using the Java [android.widget.Button|https://developer.android.com/reference/android/widget/Button] class. It should be updated to use the newer \"MaterialToolbar\" class. The newer class supports the material theme and new styles such as \"outline\" and \"text-only\" buttons.\r\nhttps://material.io/design/components/buttons.html\r\nhttps://developer.android.com/reference/com/google/android/material/button/MaterialButton\r\n\r\n*To-Do:*\r\n{{Ti.UI.Button}} supports a [style|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Button-property-style] property which is currently iOS only. We should add support for this property on Android. The iOS-only [Ti.UI.iOS.SystemButtonStyle|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.SystemButtonStyle] should be deprecated and its style constants should be moved to {{Ti.UI}} as shown below.\r\n* {{Ti.UI.BUTTON_STYLE_FILLED}}\r\n* {{Ti.UI.BUTTON_STYLE_OUTLINED}}\r\n* {{Ti.UI.BUTTON_STYLE_TEXT}}\r\n* {{Ti.UI.BUTTON_STYLE_OPTION_POSITIVE}} // = {{Ti.UI.iOS.SystemButtonStyle.DONE}}\r\n* {{Ti.UI.BUTTON_STYLE_OPTION_NEGATIVE}}\r\n* {{Ti.UI.BUTTON_STYLE_OPTION_NEUTRAL}} // = {{Ti.UI.iOS.SystemButtonStyle.PLAIN/BORDERED}}\r\n\r\nThe {{Ti.UI.BUTTON_STYLE_FILLED}} matches Android's old solid button behavior. The other styles are new on Android.\r\n\r\nNote that iOS only supports text-only buttons. Apple dropped support for bordered buttons a while ago. So, using any other unsupported style on iOS causes it to use text-only buttons.\r\n\r\n*Test:*\r\nEach button style can be tested with the attached [^ButtonStyleTest.js] script, which will display what's shown in the screenshots below.\r\n !ButtonStyle-Android-Light.png|thumbnail! !ButtonStyle-Android-Dark.png|thumbnail! !ButtonStyle-iOS.png|thumbnail! \r\n\r\n*Breaking-Change:*\r\nThe app must use a \"Theme.MaterialComponents\" based theme or else an exception will occur. So, app's using a custom theme based from \"Theme.AppCompat\" or similar will crash. This is normal and the exception will state that the theme will need to change.\r\n", "attachment": [ { "id": "67799", "filename": "ButtonStyle-Android-Dark.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-23T02:06:45.000+0000", "size": 419074, "mimeType": "image/png" }, { "id": "67800", "filename": "ButtonStyle-Android-Light.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-23T02:06:44.000+0000", "size": 421578, "mimeType": "image/png" }, { "id": "67801", "filename": "ButtonStyle-iOS.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-23T02:07:01.000+0000", "size": 776886, "mimeType": "image/png" }, { "id": "67797", "filename": "ButtonStyleTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-23T02:05:52.000+0000", "size": 922, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: Add \"MaterialButton\" support to \"Ti.UI.Button\"", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "457651", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There is any major issue where we can track all the material UI elements that will be added? \r\n\r\nI would like to see also https://material.io/components/text-fields among others", "updateAuthor": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-20T12:49:00.000+0000", "updated": "2020-11-20T12:49:00.000+0000" }, { "id": "457652", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "SDK 9.3.0 changes the default theme to the {{Material}} theme, enabling all material components :-) Make sure to inherit from it to receive the full capacity and try it out from master! {{ti sdk install -b master}}.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-11-20T13:11:10.000+0000", "updated": "2020-11-20T13:11:10.000+0000" }, { "id": "457666", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~bgarcia], we plan on switching over all Java {{View}} classes to their material equivalent classes in Titanium 10.0.0 (such as {{Button}} to {{MaterialButton}}). In fact, some UI elements such as TextField, TextArea, and TabGroup have already been switched over in 9.0.0 because they were backward compatible with AppCompat themes.\r\n\r\nIn your case, you should be able to display different material styles in a TextField \"today\" via a custom theme applied to the {{}} or per {{Ti.UI.Window}} via its \"theme\" property. But you can't apply a material style to individual TextFields yet, which is what we'd like to support in the near future.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-20T19:44:58.000+0000", "updated": "2020-11-20T19:44:58.000+0000" }, { "id": "457937", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12353", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-12-19T10:02:18.000+0000", "updated": "2020-12-19T10:02:18.000+0000" }, { "id": "458327", "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": "2021-03-03T00:16:58.000+0000", "updated": "2021-03-03T00:16:58.000+0000" }, { "id": "458352", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master and 10_0_X for 10.0.0 release target.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-03-05T15:57:41.000+0000", "updated": "2021-03-05T15:57:41.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }