{ "id": "174013", "key": "TIMOB-27334", "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": null, "resolutiondate": null, "created": "2019-08-13T23:34:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TabGroup", "android", "overlay", "tabs" ], "versions": [], "issuelinks": [ { "id": "57813", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "170382", "key": "TIMOB-25535", "fields": { "summary": "Android: Support DrawerLayout with Ti.UI.TabGroup", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-05-27T23:40:25.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": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nOn iOS, {{TabGroup}} unofficially supports an {{add()}} method which allows you to add views which overlay on top of the entire tab group. We'd like to do the same on Android.\r\n\r\n*Use-Case 1: DrawerLayout in TabGroup*\r\nOn Android, there is currently no means of adding a {{DrawerLayout}} to a {{TabGroup}}. This is a feature that many app developers want.\r\n [^TabGroupDrawerWithTabsTest.js]\r\n\r\n*Use-Case 2: DrawerLayout without Tabs*\r\nA common Android user-interface is to use a DrawerLayout to select tabs/views. For example, Google's gmail app displays different views by tapping on buttons/links in the drawer. The below code hides a {{TabGroup}}'s tabs so that a {{DrawerLayout}} can select tabs instead.\r\n [^TabGroupDrawerWithoutTabsTest.js] \r\n\r\n*Use-Case 3: Overlay translucent view on top of TabGroup*\r\nAnother use-case is to overlay a translucent view which can be used to display instructions to the end-user. This currently works on iOS today.\r\n [^TabGroupOverlayTest.js] \r\n !iOS-TabGroup-Overlay.png|thumbnail! \r\n\r\n*Recommended Solution:*\r\nTitanium's [TiUIAbstractTabGroup|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIAbstractTabGroup.java] Java class should override the following methods in our [TiUIView|https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java] similar to how it's done in [TiUIScrollVIew|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollView.java].\r\n* {{void add(TiUIView)}}\r\n* {{void insertAt(TiUIView, int)}}\r\n* {{void remove(TiUIView)}}\r\n", "attachment": [ { "id": "66831", "filename": "iOS-TabGroup-Overlay.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-13T23:26:35.000+0000", "size": 108286, "mimeType": "image/png" }, { "id": "66833", "filename": "TabGroupDrawerWithoutTabsTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-13T23:49:28.000+0000", "size": 1393, "mimeType": "application/x-javascript" }, { "id": "66832", "filename": "TabGroupDrawerWithTabsTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-13T23:49:22.000+0000", "size": 1083, "mimeType": "application/x-javascript" }, { "id": "66830", "filename": "TabGroupOverlayTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-13T23:26:35.000+0000", "size": 1042, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: Add TabGroup.add() method to support view overlays", "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": [], "maxResults": 1, "total": 1, "startAt": 0 } } }