{ "id": "175890", "key": "TIMOB-28274", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2021-01-16T03:19:46.000+0000", "created": "2020-12-08T18:57:09.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "tabbedbar" ], "versions": [ { "id": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "issuelinks": [ { "id": "59100", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "175960", "key": "TIMOB-28317", "fields": { "summary": "TiAPI: Add Ti.UI.OptionBar", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-01-17T18:40:54.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": "Starting in 9.3.0, we have the full power of material components, laying the base for a modern Android UI. During our migration, we noticed that there's an awesome UI component for segmented buttons, similar to the {{UISegmentedControl}} API on iOS - the {{MaterialButtonToggleGroup}} API.\r\n\r\nSee the following image on how a button group looks like:\r\n !Bildschirmfoto 2020-12-08 um 19.54.27.png|thumbnail!\r\n\r\nThere is a nearly 100 % parity possible with iOS and it has the HUGE advantage to size properly, different to the {{TabLayout}} thats currently used. The latter is usually used for full-width activities, but not meant for inline controls. Instead, the {{MaterialButtonToggleGroup}} has a flexible with and also handles icons, tinting and long text better.\r\n\r\nMore links and references:\r\n- https://material.io/develop/android/components/buttons\r\n- https://medium.com/over-engineering/hands-on-with-material-components-for-android-buttons-76fa1a92ec0a", "attachment": [ { "id": "67748", "filename": "Bildschirmfoto 2020-12-08 um 19.54.27.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-12-08T18:54:36.000+0000", "size": 91106, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Rewrite Ti.UI.TabbedBar with \"MaterialButtonToggleGroup\" API", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "457837", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Couldn't wait for this to be realized ~ https://github.com/hansemannn/titanium-android-tabbed-bar", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-12-08T21:12:13.000+0000", "updated": "2020-12-08T21:12:13.000+0000" }, { "id": "458016", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm thinking {{Ti.UI.TabbedBar}} on Android should remain as-is and continue to use the native Java {{TabLayout}} and {{BottomNavigationView}} since they are literal tab widgets. _(Most people would expect a A view named {{TabbedBar}} to show tabs.)_\r\n\r\nInstead, we should create a new {{Ti.UI.OptionBar}} which can be set up to use either Android's {{MaterialToggleButtonGroup}}, {{ChipGroup}} to show material choice chips, or {{RadioGroup}} to show radio buttons. We've received requests to support radio buttons and this is a good place to put it. And the {{OptionBar}} name pairs well with our existing {{Ti.UI.OptionDialog}} which also shows radio buttons on Android. I think the new {{Ti.UI.OptionBar}} should default to using {{MaterialToggleButtonGroup}} since it looks similar to the old iOS segmented control.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-16T03:18:57.000+0000", "updated": "2021-01-16T03:18:57.000+0000" }, { "id": "458017", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing in favor of: [TIMOB-28317]", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-16T03:19:18.000+0000", "updated": "2021-01-16T03:19:18.000+0000" }, { "id": "458021", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I have to disagree strongly here - and am a bit surprised there isn't even a discussion before closing this - with multiple people watching this ticket and dozens of other developers already using my workaround-module.\r\n\r\n{quote}\r\nMost people would expect a A view named TabbedBar to show tabs.\r\n{quote}\r\nThats the most critical sentence to discuss. They do not. The Ti.UI.TabbedBar was iOS only for 10+ years and once they had parity on Android, they (including me and developers I talked with) wondered about the completely different UI compared to iOS *which they expected*. Now, after a few more years of having a {{TabbedBar}} API on Android, which doesn't actually work for most designs and has critical/unresolved bugs like not being able to be displayed in a list-view (!), there finally is an API that can help with all those open issues and also provides 90 % parity with iOS.\r\n\r\nThe down sides of an own option bar is obvious:\r\n- No parity with iOS (and copying the tabbed bar on iOS to this one is bad design and requires changes that make no sense)\r\n- Issues with the already hardly-maintained Alloy (new bindings, wrapper, {{labels}}-tags, ...)\r\n- Not being required (one could just expose a {{style}} property to the tabbed-bar, just like done for the switches and other APIs already)\r\n\r\nThis is a sad decision and I hope the insights help to understand how developers that use Titanium on a daily base position themselves regarding this topic.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-01-16T11:03:34.000+0000", "updated": "2021-01-16T11:03:34.000+0000" }, { "id": "458023", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Also find it a bit confusing to have Ti.UI.TabbedBar, Ti.UI.OptionBar and Ti.UI.ButtonBar at the end that look very similar.\r\nI would keep the TabbedBar and use/style it the same as iOS (like mentioned in the first commend/fork by Hans). \r\n\r\nHaving the Chips is really nice but looking at the things you can do with them (eg. selecting multiple options, making it editable, having it slideable, different states...) would make a Ti.UI.OptionBar for radio AND chips very hard to handle and it doesn't have a ireal iOS parity. So it would be very hard to add those options later on. \r\nWhy not add it as a Ti.UI.Android.Chip and something like RadioGroup/Radio? Makes it easier to find if you know the Material element your are looking for. And if there is no parity for iOS I wouldn't force it to use a TabbedBar.", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-01-17T18:40:54.000+0000", "updated": "2021-01-17T18:40:54.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }